Re: [Linuxptp-users] Missing Sanity Checks for malloc()/calloc()/strdup() in linuxptp-1.5

2015-09-02 Thread Richard Cochran
On Tue, Sep 01, 2015 at 09:34:32PM +, Keller, Jacob E wrote: > By die gracefully here, I mean not segfault, but just instantly quit. Right, and Miroslav's recent patches do catch a malloc failure and call exit() in that case. Thanks, Richard

Re: [Linuxptp-users] Missing Sanity Checks for malloc()/calloc()/strdup() in linuxptp-1.5

2015-09-01 Thread Keller, Jacob E
> -Original Message- > From: Miroslav Lichvar [mailto:mlich...@redhat.com] > Sent: Thursday, August 27, 2015 8:16 AM > To: linuxptp-users@lists.sourceforge.net > Subject: Re: [Linuxptp-users] Missing Sanity Checks for > malloc()/calloc()/strdup() in linuxptp-1.5 > &

Re: [Linuxptp-users] Missing Sanity Checks for malloc()/calloc()/strdup() in linuxptp-1.5

2015-08-27 Thread Miroslav Lichvar
On Thu, Aug 27, 2015 at 04:06:23PM +0200, Xavier Bestel wrote: Under linux malloc() will only return NULL when you get out of address space, i.e. virtually never on a 64bits machine. Low memory situations are handled elsewhere (e.g. OOM killer). So I don't think checking malloc() for NULL is

Re: [Linuxptp-users] Missing Sanity Checks for malloc()/calloc()/strdup() in linuxptp-1.5

2015-08-21 Thread Miroslav Lichvar
Hi, (this probably belongs to the linuxptp-devel list) On Thu, Aug 20, 2015 at 02:51:04PM -0700, Bill Parker wrote: Hello All, In reviewing source code in linuxptp-1.5, I found several instances where the return values for calls to malloc()/calloc()/strdup() are not checked for a

[Linuxptp-users] Missing Sanity Checks for malloc()/calloc()/strdup() in linuxptp-1.5

2015-08-20 Thread Bill Parker
Hello All, In reviewing source code in linuxptp-1.5, I found several instances where the return values for calls to malloc()/calloc()/strdup() are not checked for a return value of NULL, indicating failure. This is in file 'timemaster.c', and the patch file below should address these issues,

Re: [Linuxptp-users] Missing Sanity Checks for malloc()/calloc()/strdup() in linuxptp-1.5

2015-08-20 Thread Keller, Jacob E
Hi Bill, On Thu, 2015-08-20 at 14:51 -0700, Bill Parker wrote: Hello All, In reviewing source code in linuxptp-1.5, I found several instances where the return values for calls to malloc()/calloc()/strdup() are not checked for a return value of NULL, indicating failure. This is in