From 2056f8f13d35cf95008302a7106bd4d736494913 Mon Sep 17 00:00:00 2001 From: kris Date: Mon, 31 Jul 2000 21:37:29 +0000 Subject: Fix a bug in keyed sorting due to malloc abuse. Submitted by: green --- gnu/usr.bin/sort/sort.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/usr.bin') 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 /* 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; -- cgit v1.1