]> granicus.if.org Git - file/commitdiff
Part of Guy Harris' Jan-93 rewrite, including:
authorIan Darwin <ian@darwinsys.com>
Fri, 19 Feb 1993 14:22:43 +0000 (14:22 +0000)
committerIan Darwin <ian@darwinsys.com>
Fri, 19 Feb 1993 14:22:43 +0000 (14:22 +0000)
Leave room for the extra '\0' that "process()" puts at the end
of the buffer.

src/ascmagic.c

index 531a999dfc55d1e17fbaf73693b67a6cab8e8a91..1b21396cb0ecdb40cadf9afc5051d4200c83f853 100644 (file)
@@ -36,7 +36,7 @@
 
 #ifndef        lint
 static char *moduleid = 
-       "@(#)$Id: ascmagic.c,v 1.11 1992/09/11 10:08:52 ian Exp $";
+       "@(#)$Id: ascmagic.c,v 1.12 1993/02/19 14:22:43 ian Exp $";
 #endif /* lint */
 
                        /* an optimisation over plain strcmp() */
@@ -49,7 +49,7 @@ int nbytes;   /* size actually read */
 {
        int i, isblock, has_escapes = 0;
        unsigned char *s;
-       char nbuf[HOWMANY];
+       char nbuf[HOWMANY+1];   /* one extra for terminating '\0' */
        char *token;
        register struct names *p;