Added argument to fmt_scan() to specify the buffer size.
[mmh] / uip / forwsbr.c
index 79dfd10..9abf20d 100644 (file)
@@ -191,7 +191,7 @@ finished:
        adios ("dup", "unable to");
 
     line = mh_xmalloc ((unsigned) fmtsize);
-    fmt_scan (fmt, line, fmtsize, dat);
+    fmt_scan (fmt, line, fmtsize - 1, fmtsize, dat);
     fputs (line, tmp);
     free (line);
     if (fclose (tmp))