mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-02 08:22:22 +00:00
Don't pass un-encoded file name to mkstemp.
src/callproc.c (Fcall_process_region): Encode expanded temp file pattern before passing it to mkstemp or mktemp.
This commit is contained in:
parent
d3cefd1358
commit
7c2fcf9bad
@ -3,6 +3,8 @@
|
||||
* callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
|
||||
fails, signal an error instead of continuing with an empty
|
||||
string. (Bug#13079)
|
||||
Encode expanded temp file pattern before passing it to mkstemp or
|
||||
mktemp.
|
||||
|
||||
2012-12-04 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
|
@ -959,8 +959,9 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
|
||||
{
|
||||
USE_SAFE_ALLOCA;
|
||||
Lisp_Object pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir);
|
||||
char *tempfile = SAFE_ALLOCA (SBYTES (pattern) + 1);
|
||||
memcpy (tempfile, SDATA (pattern), SBYTES (pattern) + 1);
|
||||
Lisp_Object encoded_tem = ENCODE_FILE (pattern);
|
||||
char *tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1);
|
||||
memcpy (tempfile, SDATA (encoded_tem), SBYTES (encoded_tem) + 1);
|
||||
coding_systems = Qt;
|
||||
|
||||
#ifdef HAVE_MKSTEMP
|
||||
|
Loading…
Reference in New Issue
Block a user