Correct buffer size.

Submitted by:	Sascha Wildner <swildner dragonflybsd org>
MFC after:	2 weeks
This commit is contained in:
delphij 2014-06-26 00:31:58 +00:00
parent 229159936f
commit 6e86e0007a

View File

@ -145,7 +145,7 @@ zuncompress(FILE *in, FILE *out, char *pre, size_t prelen,
else
compressed_pre = NULL;
while ((bin = fread(buf, 1, sizeof(buf), in)) != 0) {
while ((bin = fread(buf, 1, BUFSIZE, in)) != 0) {
if (tflag == 0 && (off_t)fwrite(buf, 1, bin, out) != bin) {
free(buf);
return -1;