summaryrefslogtreecommitdiff
path: root/usr.bin/sort/fsort.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2006-10-29 18:40:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2006-10-29 18:40:35 +0000
commit6bfad15f8cf119d313abba7264c4357ca1f1d69d (patch)
tree26c5c64577e293dc13e4cb69c2018dc97a172056 /usr.bin/sort/fsort.h
parentabc20087fbe9ac85d1111238432aa3179af49bbd (diff)
Remove useless code that can cause a SEGV if a buffer is realloc()ed.
Allocate buffers early and in one place instead of two. Make bufend global so it can be updated along with buffer. OK deraadt@
Diffstat (limited to 'usr.bin/sort/fsort.h')
-rw-r--r--usr.bin/sort/fsort.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sort/fsort.h b/usr.bin/sort/fsort.h
index d07e4010ae6..a2691563780 100644
--- a/usr.bin/sort/fsort.h
+++ b/usr.bin/sort/fsort.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsort.h,v 1.6 2006/10/28 21:14:29 naddy Exp $ */
+/* $OpenBSD: fsort.h,v 1.7 2006/10/29 18:40:34 millert Exp $ */
/*-
* Copyright (c) 1993
@@ -42,7 +42,7 @@
#define MAXFCT 1000
#define MAXLLEN ((1 << min(POW-4, 16)) - 14)
-extern u_char **keylist, *buffer, *linebuf;
+extern u_char *buffer, *bufend, *linebuf;
extern size_t bufsize, linebuf_size;
/* temp files in the stack have a file descriptor, a largest bin (maxb)