summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-03-20 19:36:28 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-03-20 19:36:28 +0000
commit45a0276771ee7b66193becda5f8dae395cdfe953 (patch)
tree6c882f16d7d73182182444228f5e7c4d33a0d572 /usr.bin
parentab86724e447c566d2633384a1a36c6966c18194f (diff)
Prevent "sort -f /dev/null" from segfaulting.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sort/append.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/sort/append.c b/usr.bin/sort/append.c
index fc162f95452..18c204a0c28 100644
--- a/usr.bin/sort/append.c
+++ b/usr.bin/sort/append.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: append.c,v 1.6 2001/02/04 21:27:00 ericj Exp $ */
+/* $OpenBSD: append.c,v 1.7 2001/03/20 19:36:27 millert Exp $ */
/*-
* Copyright (c) 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)append.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: append.c,v 1.6 2001/02/04 21:27:00 ericj Exp $";
+static char rcsid[] = "$OpenBSD: append.c,v 1.7 2001/03/20 19:36:27 millert Exp $";
#endif
#endif /* not lint */
@@ -81,7 +81,7 @@ append(keylist, nelem, depth, fp, put, ftbl)
u_char *cend, *pend, *start;
RECHEADER *crec, *prec;
- if (*keylist == '\0' && UNIQUE)
+ if (*keylist == NULL)
return;
wts1 = wts = ftbl[0].weights;
if ((!UNIQUE) && SINGL_FLD) {