diff options
author | Michael Scherer <misc@n4.mandriva.com> | 2009-03-18 22:26:29 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-03-18 14:47:33 -0700 |
commit | 92cb18f2a8a08c0c5205bb8359dd94904a7b420f (patch) | |
tree | 4d086b2e56443147555578f60a072eb970153e3a /output/outelf64.c | |
parent | 74eed4a9b33f72560b0393ba4bfe89d07660a15d (diff) | |
download | nasm-92cb18f2a8a08c0c5205bb8359dd94904a7b420f.tar.gz |
outelf32/64: fix uninitialized rbtree
Fix crash caused by uninitialised memory that lead to dangling pointer
in the rbtree. This can be seen by compiling zsnes 1.50, with a file
that define many symbols, such as fxemu2c.asm.
Diffstat (limited to 'output/outelf64.c')
-rw-r--r-- | output/outelf64.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/output/outelf64.c b/output/outelf64.c index 24d0b81c..484c4ba4 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -638,6 +638,8 @@ static void elf_deflabel(char *name, int32_t segment, int64_t offset, lastsym = sym = saa_wstruct(syms); + memset(&sym->symv, 0, sizeof(struct rbtree)); + sym->strpos = pos; sym->type = is_global ? SYM_GLOBAL : 0; sym->other = STV_DEFAULT; |