From c6ecf7f23d99a7c51a9372fefb261ddca89a1db2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 30 Jun 2014 18:39:29 +0300 Subject: Fix bug #17881 with infloop in decoding emacs-mule encoded text. src/coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. --- src/coding.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/coding.c') 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 { \ -- cgit v1.2.1