nm: First call elf_getdata, then allocate memory.
authorMark Wielaard <mjw@redhat.com>
Sat, 27 Jun 2015 20:07:01 +0000 (22:07 +0200)
committerMark Wielaard <mjw@redhat.com>
Sat, 27 Jun 2015 20:07:01 +0000 (22:07 +0200)
commitc08079a076420f67742be98d060500965eb22340
treec4b6c7dfabac76c6cc24e01118c5cb3c82644b70
parent204e36ea815440ec17bf388e8f267f0b40c2fb37
nm: First call elf_getdata, then allocate memory.

This catches bogus data early before we might try to allocate giant
amounts of memory.

Reported-by: Hanno Böck <hanno@hboeck.de>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/nm.c