From 1cc43490681263089ee601bd6579ea970c6b5065 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Tue, 16 Dec 2003 22:38:41 +0000 Subject: when we read the original file size from the gzp header in uncompress mode and compare it to total_out to detect I/O errors we need to cast total_out to u_int32_t as the gzip header file is limited to that and total_out is now 64 bits. ok millert@ --- usr.bin/compress/gzopen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/compress/gzopen.c b/usr.bin/compress/gzopen.c index 42f18bb2a23..dda9addff80 100644 --- a/usr.bin/compress/gzopen.c +++ b/usr.bin/compress/gzopen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gzopen.c,v 1.17 2003/12/09 07:34:55 millert Exp $ */ +/* $OpenBSD: gzopen.c,v 1.18 2003/12/16 22:38:40 henning Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -59,7 +59,7 @@ */ const char gz_rcsid[] = - "$OpenBSD: gzopen.c,v 1.17 2003/12/09 07:34:55 millert Exp $"; + "$OpenBSD: gzopen.c,v 1.18 2003/12/16 22:38:40 henning Exp $"; #include #include @@ -434,7 +434,7 @@ gz_read(void *cookie, char *buf, int len) errno = EINVAL; return -1; } - if (get_int32(s) != s->z_stream.total_out) { + if (get_int32(s) != (u_int32_t)s->z_stream.total_out) { errno = EIO; return -1; } -- cgit v1.2.3