From 1f625c6cd62bbf9f63d03f027a4a0214a895f28e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 2 Dec 2008 22:34:12 +0000 Subject: [PATCH] (doprnt1): Fix size of charbuf. --- src/ChangeLog | 4 ++++ src/doprnt.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 095b36bdce3..c7e9a9cc457 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-12-02 Andreas Schwab + + * doprnt.c (doprnt1): Fix size of charbuf. + 2008-12-02 Chong Yidong * keyboard.c (timer_check): Revert last change. diff --git a/src/doprnt.c b/src/doprnt.c index c7c27bac4c3..14d18366161 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -117,7 +117,7 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) char fixed_buffer[20]; /* Default buffer for small formatting. */ char *fmtcpy; int minlen; - unsigned char charbuf[5]; /* Used for %c. */ + unsigned char charbuf[MAX_MULTIBYTE_LENGTH + 1]; /* Used for %c. */ if (format_end == 0) format_end = format + strlen (format); -- 2.39.2