diff options
| author | Paul Eggert | 2011-04-17 21:16:47 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-17 21:16:47 -0700 |
| commit | 000098c13577337d3bb8cb381bd16701dc11cc32 (patch) | |
| tree | 6ec6d9a48dc63ed9c1d6dc6e9c294a0d283fd280 /src/alloc.c | |
| parent | bfd1c7811d3661512b382906334ac959d332735b (diff) | |
| download | emacs-000098c13577337d3bb8cb381bd16701dc11cc32.tar.gz emacs-000098c13577337d3bb8cb381bd16701dc11cc32.zip | |
* alloc.c (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
can cause Emacs to crash when string overrun checking is enabled.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |