multiply buffer size by MB_CUR_MAX so multi-byte chars fit
authorOliver Kiddle <okiddle@yahoo.co.uk>
Mon, 16 Jan 2006 09:55:24 +0000 (09:55 +0000)
committerOliver Kiddle <okiddle@yahoo.co.uk>
Mon, 16 Jan 2006 09:55:24 +0000 (09:55 +0000)
ChangeLog
uip/scansbr.c

index c7787ee..3a82aa4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-16  Oliver Kiddle  <okiddle@yahoo.co.uk>
+
+       * uip/scansbr.c: multiply buffer size by MB_CUR_MAX so multi-byte
+        chars fit
+
 2006-01-14  Josh Bressers <josh@bress.net>
 
        * sbr/fmt_scan.c: Turn the PUTSF macro into a function capable of
 2006-01-14  Josh Bressers <josh@bress.net>
 
        * sbr/fmt_scan.c: Turn the PUTSF macro into a function capable of
index b178e75..3303375 100644 (file)
@@ -97,7 +97,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg,
                width = MAXSCANL;
        }
        dat[3] = slwidth = width;
                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());
 
        if (outnum)
            umask(~m_gmprot());