diff options
author | kris <kris@FreeBSD.org> | 2000-07-31 21:37:29 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-07-31 21:37:29 +0000 |
commit | 2056f8f13d35cf95008302a7106bd4d736494913 (patch) | |
tree | 3a13e9010f48ec6d5ca8b01281e0d43099b2de3e /gnu/usr.bin | |
parent | 49c864f5161c83827efedb958ef8627aa5a295d5 (diff) | |
download | FreeBSD-src-2056f8f13d35cf95008302a7106bd4d736494913.zip FreeBSD-src-2056f8f13d35cf95008302a7106bd4d736494913.tar.gz |
Fix a bug in keyed sorting due to malloc abuse.
Submitted by: green
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/sort/sort.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/usr.bin/sort/sort.c b/gnu/usr.bin/sort/sort.c index f1976b4..1b5b8b0 100644 --- a/gnu/usr.bin/sort/sort.c +++ b/gnu/usr.bin/sort/sort.c @@ -19,6 +19,8 @@ The author may be reached (Email) at the address mike@gnu.ai.mit.edu, or (US mail) as Mike Haertel c/o Free Software Foundation. */ +/* $FreeBSD$ */ + #include <config.h> /* Get isblank from GNU libc. */ @@ -1860,6 +1862,7 @@ main (int argc, char **argv) insertkey (key); key = (struct keyfield *) xmalloc (sizeof (struct keyfield)); + bzero(key, sizeof(*key)); key->eword = -1; key->ignore = NULL; key->translate = NULL; |