changeset 100125:e41ac6b691bb

(doprnt1): Fix size of charbuf.
author Andreas Schwab <schwab@suse.de>
date Tue, 02 Dec 2008 22:34:12 +0000
parents d0077257129f
children dcdbc6ad9e02
files src/ChangeLog src/doprnt.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Dec 02 22:29:13 2008 +0000
+++ b/src/ChangeLog	Tue Dec 02 22:34:12 2008 +0000
@@ -1,3 +1,7 @@
+2008-12-02  Andreas Schwab  <schwab@suse.de>
+
+	* doprnt.c (doprnt1): Fix size of charbuf.
+
 2008-12-02  Chong Yidong  <cyd@stupidchicken.com>
 
 	* keyboard.c (timer_check): Revert last change.
--- a/src/doprnt.c	Tue Dec 02 22:29:13 2008 +0000
+++ b/src/doprnt.c	Tue Dec 02 22:34:12 2008 +0000
@@ -117,7 +117,7 @@
   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);