[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog fileio.c [EMACS_23_1_RC]
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/src ChangeLog fileio.c [EMACS_23_1_RC] |
Date: |
Tue, 07 Jul 2009 22:26:44 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_23_1_RC
Changes by: Chong Yidong <cyd> 09/07/07 22:26:43
Modified files:
src : ChangeLog fileio.c
Log message:
* fileio.c (Fsubstitute_in_file_name): Copy string data properly.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.7586.2.14&r2=1.7586.2.15
http://cvs.savannah.gnu.org/viewcvs/emacs/src/fileio.c?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.654&r2=1.654.2.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7586.2.14
retrieving revision 1.7586.2.15
diff -u -b -r1.7586.2.14 -r1.7586.2.15
--- ChangeLog 7 Jul 2009 06:26:05 -0000 1.7586.2.14
+++ ChangeLog 7 Jul 2009 22:26:41 -0000 1.7586.2.15
@@ -1,3 +1,7 @@
+2009-07-07 Chong Yidong <address@hidden>
+
+ * fileio.c (Fsubstitute_in_file_name): Copy string data properly.
+
2009-07-07 Kenichi Handa <address@hidden>
* .gdbinit (xcharset): Fix the treating of $arg0.
Index: fileio.c
===================================================================
RCS file: /sources/emacs/emacs/src/fileio.c,v
retrieving revision 1.654
retrieving revision 1.654.2.1
diff -u -b -r1.654 -r1.654.2.1
--- fileio.c 15 Apr 2009 00:08:24 -0000 1.654
+++ fileio.c 7 Jul 2009 22:26:43 -0000 1.654.2.1
@@ -1641,11 +1641,12 @@
if (!NILP (handler))
return call2 (handler, Qsubstitute_in_file_name, filename);
- nm = SDATA (filename);
/* Always work on a copy of the string, in case GC happens during
decode of environment variables, causing the original Lisp_String
data to be relocated. */
- nm = strcpy (alloca (strlen (nm) + 1), nm);
+ nm = (unsigned char *) alloca (SBYTES (filename) + 1);
+ bcopy (SDATA (filename), nm, SBYTES (filename) + 1);
+
#ifdef DOS_NT
CORRECT_DIR_SEPS (nm);
substituted = (strcmp (nm, SDATA (filename)) != 0);
- [Emacs-diffs] emacs/src ChangeLog fileio.c [EMACS_23_1_RC],
Chong Yidong <=