aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-01-02 05:22:05 -0500
committerEli Zaretskii2010-01-02 05:22:05 -0500
commita179af9bd20b2e9968506003937a152c1cbb5d9e (patch)
tree2e903858b7fd9cd1efda2bd38c4ac9b20a0e867f /src
parent3b8fb4b39271ee1abaa725fbda501e7f10a708c1 (diff)
parentab507311880d1b971a6bfad2676d92548041f63f (diff)
downloademacs-a179af9bd20b2e9968506003937a152c1cbb5d9e.tar.gz
emacs-a179af9bd20b2e9968506003937a152c1cbb5d9e.zip
Merge from upstream.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/nsterm.m3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 73000341f68..d6e7f2c9791 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12010-01-01 Chong Yidong <cyd@stupidchicken.com> 12010-01-01 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * nsterm.m (ns_get_color): Fix buffer overflow (Bug#4763).
4
3 * lread.c (syms_of_lread): Make it clearer that these are the 5 * lread.c (syms_of_lread): Make it clearer that these are the
4 names of loaded files (Bug#5068). 6 names of loaded files (Bug#5068).
5 7
diff --git a/src/nsterm.m b/src/nsterm.m
index 9256c084e28..2eebbf86643 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1346,7 +1346,8 @@ ns_get_color (const char *name, NSColor **col)
1346 } 1346 }
1347 else if (!strncmp(name, "rgb:", 4)) /* A newer X11 format -- rgb:r/g/b */ 1347 else if (!strncmp(name, "rgb:", 4)) /* A newer X11 format -- rgb:r/g/b */
1348 { 1348 {
1349 strcpy(hex, name + 4); 1349 strncpy (hex, name + 4, 19);
1350 hex[19] = '\0';
1350 scaling = (strlen(hex) - 2) / 3; 1351 scaling = (strlen(hex) - 2) / 3;
1351 } 1352 }
1352 else if (name[0] == '#') /* An old X11 format; convert to newer */ 1353 else if (name[0] == '#') /* An old X11 format; convert to newer */