diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/alloc.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d51052f0e3d..fa2aa03233d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | This doesn't fix a bug but makes the code clearer. | 4 | This doesn't fix a bug but makes the code clearer. |
| 5 | (string_overrun_cookie): Now const. Use initializers that | 5 | (string_overrun_cookie): Now const. Use initializers that |
| 6 | don't formally overflow signed char, to avoid warnings. | 6 | don't formally overflow signed char, to avoid warnings. |
| 7 | (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that | ||
| 8 | can cause Emacs to crash when string overrun checking is enabled. | ||
| 7 | 9 | ||
| 8 | 2011-04-17 Chong Yidong <cyd@stupidchicken.com> | 10 | 2011-04-17 Chong Yidong <cyd@stupidchicken.com> |
| 9 | 11 | ||
diff --git a/src/alloc.c b/src/alloc.c index 2029383dec8..2af75e3c471 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1937,7 +1937,8 @@ allocate_string_data (struct Lisp_String *s, | |||
| 1937 | s->size_byte = nbytes; | 1937 | s->size_byte = nbytes; |
| 1938 | s->data[nbytes] = '\0'; | 1938 | s->data[nbytes] = '\0'; |
| 1939 | #ifdef GC_CHECK_STRING_OVERRUN | 1939 | #ifdef GC_CHECK_STRING_OVERRUN |
| 1940 | memcpy (data + needed, string_overrun_cookie, GC_STRING_OVERRUN_COOKIE_SIZE); | 1940 | memcpy ((char *) data + needed, string_overrun_cookie, |
| 1941 | GC_STRING_OVERRUN_COOKIE_SIZE); | ||
| 1941 | #endif | 1942 | #endif |
| 1942 | 1943 | ||
| 1943 | /* If S had already data assigned, mark that as free by setting its | 1944 | /* If S had already data assigned, mark that as free by setting its |