Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2014 00:31:58 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267887 - head/usr.bin/gzip
Message-ID:  <201406260031.s5Q0VwBn037609@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Thu Jun 26 00:31:58 2014
New Revision: 267887
URL: http://svnweb.freebsd.org/changeset/base/267887

Log:
  Correct buffer size.
  
  Submitted by:	Sascha Wildner <swildner dragonflybsd org>
  MFC after:	2 weeks

Modified:
  head/usr.bin/gzip/zuncompress.c

Modified: head/usr.bin/gzip/zuncompress.c
==============================================================================
--- head/usr.bin/gzip/zuncompress.c	Wed Jun 25 23:42:53 2014	(r267886)
+++ head/usr.bin/gzip/zuncompress.c	Thu Jun 26 00:31:58 2014	(r267887)
@@ -145,7 +145,7 @@ zuncompress(FILE *in, FILE *out, char *p
 	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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406260031.s5Q0VwBn037609>