* nsterm.m (ns_get_color): Fix buffer overflow (Bug#4763).
2010-01-01 Chong Yidong <cyd@stupidchicken.com>
+ * nsterm.m (ns_get_color): Fix buffer overflow (Bug#4763).
+
* lread.c (syms_of_lread): Make it clearer that these are the
names of loaded files (Bug#5068).
}
else if (!strncmp(name, "rgb:", 4)) /* A newer X11 format -- rgb:r/g/b */
{
- strcpy(hex, name + 4);
+ strncpy (hex, name + 4, 19);
+ hex[19] = '\0';
scaling = (strlen(hex) - 2) / 3;
}
else if (name[0] == '#') /* An old X11 format; convert to newer */