From: Eli Zaretskii Date: Mon, 30 Jun 2014 15:39:29 +0000 (+0300) Subject: Fix bug #17881 with infloop in decoding emacs-mule encoded text. X-Git-Tag: emacs-25.0.90~2636^2~74^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c6ecf7f23d99a7c51a9372fefb261ddca89a1db2;p=emacs.git Fix bug #17881 with infloop in decoding emacs-mule encoded text. src/coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. --- diff --git a/src/ChangeLog b/src/ChangeLog index b87555344f9..ad34152d1a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-06-30 Eli Zaretskii + + * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881) + 2014-06-30 Jan Djärv * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO diff --git a/src/coding.c b/src/coding.c index 5dbaf96840a..85a50dad91f 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7266,7 +7266,8 @@ produce_charset (struct coding_system *coding, int *charbuf, ptrdiff_t pos) } #define MAX_CHARBUF_SIZE 0x4000 -#define MIN_CHARBUF_SIZE 0x10 +/* emacs-mule decoding requires more than 16 bytes. */ +#define MIN_CHARBUF_SIZE 0x20 #define ALLOC_CONVERSION_WORK_AREA(coding, size) \ do { \