mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-12 16:23:57 +00:00
Fix buffer overflow in ns_get_color.
* nsterm.m (ns_get_color): Fix buffer overflow (Bug#4763).
This commit is contained in:
parent
bd0948ca04
commit
87231e2cfe
@ -1,5 +1,7 @@
|
||||
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).
|
||||
|
||||
|
@ -1346,7 +1346,8 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
}
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user