mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-30 08:09:04 +00:00
* alloc.c (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
can cause Emacs to crash when string overrun checking is enabled.
This commit is contained in:
parent
bfd1c7811d
commit
000098c135
@ -4,6 +4,8 @@
|
||||
This doesn't fix a bug but makes the code clearer.
|
||||
(string_overrun_cookie): Now const. Use initializers that
|
||||
don't formally overflow signed char, to avoid warnings.
|
||||
(allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
|
||||
can cause Emacs to crash when string overrun checking is enabled.
|
||||
|
||||
2011-04-17 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
|
@ -1937,7 +1937,8 @@ allocate_string_data (struct Lisp_String *s,
|
||||
s->size_byte = nbytes;
|
||||
s->data[nbytes] = '\0';
|
||||
#ifdef GC_CHECK_STRING_OVERRUN
|
||||
memcpy (data + needed, string_overrun_cookie, GC_STRING_OVERRUN_COOKIE_SIZE);
|
||||
memcpy ((char *) data + needed, string_overrun_cookie,
|
||||
GC_STRING_OVERRUN_COOKIE_SIZE);
|
||||
#endif
|
||||
|
||||
/* If S had already data assigned, mark that as free by setting its
|
||||
|
Loading…
Reference in New Issue
Block a user