[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog xfaces.c
From: |
Jim Meyering |
Subject: |
[Emacs-diffs] emacs/src ChangeLog xfaces.c |
Date: |
Tue, 09 Jun 2009 05:57:37 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Jim Meyering <meyering> 09/06/09 05:57:37
Modified files:
src : ChangeLog xfaces.c
Log message:
x-load-color-file: avoid array bounds error
x-load-color-file expects each line of input to be of the form
"R G B name". But if "name" is missing, it would read name[-1],
and if that value is '\n', zero it.
* xfaces.c (Fx_load_color_file): Handle missing color name.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7562&r2=1.7563
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xfaces.c?cvsroot=emacs&r1=1.435&r2=1.436
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7562
retrieving revision 1.7563
diff -u -b -r1.7562 -r1.7563
--- ChangeLog 9 Jun 2009 02:53:21 -0000 1.7562
+++ ChangeLog 9 Jun 2009 05:57:35 -0000 1.7563
@@ -1,3 +1,11 @@
+2009-06-09 Jim Meyering <address@hidden>
+
+ x-load-color-file: avoid array bounds error
+ x-load-color-file expects each line of input to be of the form
+ "R G B name". But if "name" is missing, it would read name[-1],
+ and if that value is '\n', zero it.
+ * xfaces.c (Fx_load_color_file): Handle missing color name.
+
2009-06-09 Kenichi Handa <address@hidden>
* charset.c (Fmap_charset_chars): In docstring, state clearly that
Index: xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.435
retrieving revision 1.436
diff -u -b -r1.435 -r1.436
--- xfaces.c 14 May 2009 21:37:03 -0000 1.435
+++ xfaces.c 9 Jun 2009 05:57:37 -0000 1.436
@@ -6630,7 +6630,7 @@
{
char *name = buf + num;
num = strlen (name) - 1;
- if (name[num] == '\n')
+ if (num >= 0 && name[num] == '\n')
name[num] = 0;
cmap = Fcons (Fcons (build_string (name),
#ifdef WINDOWSNT
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/src ChangeLog xfaces.c,
Jim Meyering <=