summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2004-01-03 02:39:18 +0000
committermrg <mrg@NetBSD.org>2004-01-03 02:39:18 +0000
commitd8d414bd77cee53e06bc30e782a9f9e054e5e2e0 (patch)
tree8f42d0966afd0ee1fccf96208c997d29d0121293 /usr.bin
parent6f9a1982b5519c026d7c476b8c3889670dd142af (diff)
prepend_gzip: avoid searching beyond this string
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/gzip/gzip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/gzip/gzip.c b/usr.bin/gzip/gzip.c
index 42f5f20fcf7..8829b010c5d 100644
--- a/usr.bin/gzip/gzip.c
+++ b/usr.bin/gzip/gzip.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gzip.c,v 1.17 2004/01/02 10:09:42 simonb Exp $ */
+/* $NetBSD: gzip.c,v 1.18 2004/01/03 02:39:18 mrg Exp $ */
/*
* Copyright (c) 1997, 1998, 2003 Matthew R. Green
@@ -32,7 +32,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003 Matthew R. Green\n\
All rights reserved.\n");
-__RCSID("$NetBSD: gzip.c,v 1.17 2004/01/02 10:09:42 simonb Exp $");
+__RCSID("$NetBSD: gzip.c,v 1.18 2004/01/03 02:39:18 mrg Exp $");
#endif /* not lint */
/*
@@ -341,6 +341,8 @@ prepend_gzip(char *gzip, int *argc, char ***argv)
for (; *s; s++)
if (*s == ' ' || *s == '\t')
break;
+ if (*s == 0)
+ break;
}
/* punt early */
if (nenvarg == 0)