Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by

zoulasc) to contrib/file:

  don't write a char to a pointer.

MFC after:	3 days
This commit is contained in:
dim 2013-12-22 14:14:53 +00:00
parent aa0067c72b
commit a73ec90252

View File

@ -480,7 +480,7 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
#endif #endif
free(*newch); free(*newch);
n = 0; n = 0;
newch[0] = '\0'; *newch = NULL;
goto err; goto err;
} else { } else {
n = r; n = r;