summaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-22 23:31:41 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-22 23:31:41 -0700
commit6d84508d181fec22ef538b5a6ba7e2072d1de8e7 (patch)
treeef8d0592e00b9122e5a0762e6c0a42191fab5e73 /src/keyboard.h
parent20270765bee11c46dc5a16ccca169751ce4e89ea (diff)
downloademacs-6d84508d181fec22ef538b5a6ba7e2072d1de8e7.tar.gz
* macros.c: Integer and buffer overflow fixes.
* keyboard.h (struct keyboard.kbd_macro_bufsize): * macros.c (Fstart_kbd_macro, store_kbd_macro_char): Use ptrdiff_t, not int, for sizes. Don't increment bufsize until after realloc succeeds. Check for size-calculation overflow. (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
index 20763c35f3a..91008a3ea24 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -123,7 +123,7 @@ struct kboard
Lisp_Object *kbd_macro_end;
/* Allocated size of kbd_macro_buffer. */
- int kbd_macro_bufsize;
+ ptrdiff_t kbd_macro_bufsize;
/* Last anonymous kbd macro defined. */
Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_kbd_macro);