From da67f77e5a66799deac35ae8d9c538f9222bc8af Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 16 Jan 2006 09:55:24 +0000 Subject: [PATCH] multiply buffer size by MB_CUR_MAX so multi-byte chars fit --- ChangeLog | 5 +++++ uip/scansbr.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c7787ee..3a82aa4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-16 Oliver Kiddle + + * uip/scansbr.c: multiply buffer size by MB_CUR_MAX so multi-byte + chars fit + 2006-01-14 Josh Bressers * sbr/fmt_scan.c: Turn the PUTSF macro into a function capable of diff --git a/uip/scansbr.c b/uip/scansbr.c index b178e75..3303375 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -97,7 +97,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, width = MAXSCANL; } dat[3] = slwidth = width; - scanl = (char *) mh_xmalloc((size_t) (slwidth + 2) ); + scanl = (char *) mh_xmalloc((size_t) MB_CUR_MAX * ((slwidth + 2) ); if (outnum) umask(~m_gmprot()); -- 1.7.10.4