[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110997: Don't pass un-encoded fil
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110997: Don't pass un-encoded file name to mkstemp. |
Date: |
Wed, 05 Dec 2012 19:39:39 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110997
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Wed 2012-12-05 19:39:39 +0200
message:
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.
modified:
src/ChangeLog
src/callproc.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-12-05 17:10:00 +0000
+++ b/src/ChangeLog 2012-12-05 17:39:39 +0000
@@ -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 <address@hidden>
=== modified file 'src/callproc.c'
--- a/src/callproc.c 2012-12-05 17:10:00 +0000
+++ b/src/callproc.c 2012-12-05 17:39:39 +0000
@@ -959,8 +959,9 @@
{
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110997: Don't pass un-encoded file name to mkstemp.,
Eli Zaretskii <=