aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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 */