From: Christos Zoulas Date: Mon, 18 Nov 2013 17:54:58 +0000 (+0000) Subject: don't write a char to a pointer. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5371a9fc3911a99720dafc1955302a80f509d8f1;p=file don't write a char to a pointer. --- diff --git a/src/compress.c b/src/compress.c index e0802d8a..b04383e4 100644 --- a/src/compress.c +++ b/src/compress.c @@ -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;