aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/minibuf.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 435d883e14f..4e10537edc8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12011-07-29 Paul Eggert <eggert@cs.ucla.edu> 12011-07-29 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * minibuf.c (read_minibuf_noninteractive): Don't leak memory
4 on memory overflow.
5
3 * macros.c: Integer and memory overflow fixes. 6 * macros.c: Integer and memory overflow fixes.
4 (Fstart_kbd_macro): Don't update size until alloc done. 7 (Fstart_kbd_macro): Don't update size until alloc done.
5 (store_kbd_macro_char): Reorder multiplicands to avoid overflow. 8 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
diff --git a/src/minibuf.c b/src/minibuf.c
index eb564a10ec6..30082af9037 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -261,7 +261,10 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
261 if (len == size) 261 if (len == size)
262 { 262 {
263 if (STRING_BYTES_BOUND / 2 < size) 263 if (STRING_BYTES_BOUND / 2 < size)
264 memory_full (SIZE_MAX); 264 {
265 xfree (line);
266 memory_full (SIZE_MAX);
267 }
265 size *= 2; 268 size *= 2;
266 line = (char *) xrealloc (line, size); 269 line = (char *) xrealloc (line, size);
267 } 270 }