summaryrefslogtreecommitdiffstats
path: root/usr.bin/symorder
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-10-07 08:13:24 +0000
committerphk <phk@FreeBSD.org>1995-10-07 08:13:24 +0000
commit591ef5eca73bf4be0b340ce8f561343798485a15 (patch)
tree37f244f7cf4527e6b93bd3713aca8992815ddfd9 /usr.bin/symorder
parent11b88f454b1ce841ffafc39b6bcec68c51a2ffec (diff)
downloadFreeBSD-src-591ef5eca73bf4be0b340ce8f561343798485a15.zip
FreeBSD-src-591ef5eca73bf4be0b340ce8f561343798485a15.tar.gz
Symorder relies on malloc to return zero'ed data. Found with phkmalloc/2.
Diffstat (limited to 'usr.bin/symorder')
-rw-r--r--usr.bin/symorder/symorder.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/symorder/symorder.c b/usr.bin/symorder/symorder.c
index 8d42929..81ddbe7 100644
--- a/usr.bin/symorder/symorder.c
+++ b/usr.bin/symorder/symorder.c
@@ -185,6 +185,7 @@ main(argc, argv)
newtab = (struct nlist *)malloc(n);
if (newtab == (struct nlist *)NULL)
error(NULL);
+ memset(newtab,0,n);
i = n / sizeof(struct nlist);
reorder(symtab, newtab, i);
OpenPOWER on IntegriCloud