From a73ec90252c3b4c5ac79fcc9a8d1bae2c12e9b83 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 22 Dec 2013 14:14:53 +0000 Subject: [PATCH] Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by zoulasc) to contrib/file: don't write a char to a pointer. MFC after: 3 days --- contrib/file/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/file/compress.c b/contrib/file/compress.c index 4308abfaa3ab..2d8d77f2cb35 100644 --- a/contrib/file/compress.c +++ b/contrib/file/compress.c @@ -480,7 +480,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;