From: Oliver Kiddle Date: Mon, 16 Jan 2006 09:55:24 +0000 (+0000) Subject: multiply buffer size by MB_CUR_MAX so multi-byte chars fit X-Git-Tag: nmh-1_3_RC1~72 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=da67f77e5a66799deac35ae8d9c538f9222bc8af;p=mmh multiply buffer size by MB_CUR_MAX so multi-byte chars fit --- 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());