]> granicus.if.org Git - file/commitdiff
don't write a char to a pointer.
authorChristos Zoulas <christos@zoulas.com>
Mon, 18 Nov 2013 17:54:58 +0000 (17:54 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 18 Nov 2013 17:54:58 +0000 (17:54 +0000)
src/compress.c

index e0802d8acc666eea133782a79884a7d13ac436ea..b04383e49fee97015c3f8fa3f9b12d0730a20551 100644 (file)
@@ -35,7 +35,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: compress.c,v 1.71 2013/07/21 21:06:41 rrt Exp $")
+FILE_RCSID("@(#)$File: compress.c,v 1.72 2013/11/18 17:54:58 christos Exp $")
 #endif
 
 #include "magic.h"
@@ -479,7 +479,7 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
 #endif
                        free(*newch);
                        n = 0;
-                       newch[0] = '\0';
+                       *newch = NULL;
                        goto err;
                } else {
                        n = r;