Fix a bug in keyed sorting due to malloc abuse.

Submitted by:	green
This commit is contained in:
Kris Kennaway 2000-07-31 21:37:29 +00:00
parent 47a1b949fb
commit 1909961a9b

View File

@ -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;