]> git.eshelyaron.com Git - emacs.git/commit
Fix bug uncovered by changing alloca to auto buffer.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Sep 2014 22:27:59 +0000 (15:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Sep 2014 22:27:59 +0000 (15:27 -0700)
commit4612d1eab721a1010312382d1048c8b3a67b18fa
treee0c89c15723fce2430853d3eddb9535ce0ad9e38
parentd5e25ad17f871ed7837fcc5277efce762c112f2a
Fix bug uncovered by changing alloca to auto buffer.

* coding.c (growable_destination): New function.
(produce_chars): Use it for sanity checks.  Do not fiddle with
dst_end if the source and destination are both nil, as it's
the caller's responsibility to avoid overlap.
* keyboard.c (read_decoded_event_from_main_queue):
The destination must be MAX_MULTIBYTE_LENGTH times the max source
length, not 4 times, to prevent decode_coding_c_string from trying
to reallocate a destination.  This removes the need for the FIXME.

Fixes: debbugs:18410
src/ChangeLog
src/coding.c
src/keyboard.c