Re: nm(1): return on malloc error

2019-03-03 Thread Ingo Schwarze
Hi, Benjamin Baier wrote on Sat, Mar 02, 2019 at 10:10:40AM +0100: > On malloc error symtab is unmapped, so proceeding on will lead > to a NULL pointer dereference. > When malloc fails we should return like the MMAP case does. Committed. Thanks for the patch (and to those who checked it).

Re: nm(1): return on malloc error

2019-03-03 Thread Otto Moerbeek
On Sun, Mar 03, 2019 at 04:23:53PM +0100, Ingo Schwarze wrote: > Hi, > > Benjamin Baier wrote on Sat, Mar 02, 2019 at 10:10:40AM +0100: > > > On malloc error symtab is unmapped, so proceeding on will lead > > to a NULL pointer dereference. > > When malloc fails we should return like the MMAP

Re: nm(1): return on malloc error

2019-03-03 Thread Ingo Schwarze
Hi, Benjamin Baier wrote on Sat, Mar 02, 2019 at 10:10:40AM +0100: > On malloc error symtab is unmapped, so proceeding on will lead > to a NULL pointer dereference. > When malloc fails we should return like the MMAP case does. while i'm certainly not experienced with nm(1), this change looks

Re: nm(1): return on malloc error

2019-03-02 Thread Benjamin Baier
Ping. On malloc error symtab is unmapped, so proceeding on will lead to a NULL pointer dereference. On Wed, 20 Feb 2019 17:55:08 +0100 Benjamin Baier wrote: > Hi. > > When malloc fails we should return like the MMAP case does. > > Greetings Ben > Index: nm.c

nm(1): return on malloc error

2019-02-20 Thread Benjamin Baier
Hi. When malloc fails we should return like the MMAP case does. Greetings Ben Index: nm.c === RCS file: /cvs/src/usr.bin/nm/nm.c,v retrieving revision 1.53 diff -u -p -u -C10 -r1.53 nm.c *** nm.c27 Oct 2017 16:47:08 -