-/* $OpenBSD: gzopen.c,v 1.24 2007/03/19 13:02:18 pedro Exp $ */
+/* $OpenBSD: gzopen.c,v 1.25 2008/08/20 09:22:02 mpf Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
#ifndef SMALL
const char gz_rcsid[] =
- "$OpenBSD: gzopen.c,v 1.24 2007/03/19 13:02:18 pedro Exp $";
+ "$OpenBSD: gzopen.c,v 1.25 2008/08/20 09:22:02 mpf Exp $";
#endif
#include <sys/param.h>
}
error = inflate(&(s->z_stream), Z_NO_FLUSH);
+
+ if (error == Z_DATA_ERROR) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (error == Z_BUF_ERROR) {
+ errno = EIO;
+ return -1;
+ }
if (error == Z_STREAM_END) {
/* Check CRC and original size */
s->z_crc = crc32(s->z_crc, start,
#!/bin/sh -
#
-# $OpenBSD: zmore,v 1.5 2007/05/20 00:27:27 jsg Exp $
+# $OpenBSD: zmore,v 1.6 2008/08/20 09:22:02 mpf Exp $
#
# Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
#
# No files means read from stdin
if [ $# -eq 0 ]; then
- compress -cdfq 2>&1 | $pager $flags
+ compress -cdf 2>&1 | $pager $flags
exit 0
fi
oterm=`stty -g 2>/dev/null`
while test $# -ne 0; do
- compress -cdfq "$1" 2>&1 | $pager $flags
+ compress -cdf "$1" 2>&1 | $pager $flags
prev="$1"
shift
if tty -s && test -n "$oterm" -a $# -gt 0; then