[Icecast-dev] You don't check for malloc failure

Philipp Schafft src=xiph at lion.leolix.org
Fri Apr 29 02:08:44 PDT 2011


reflum,

On Fri, 2011-04-29 at 09:05 +0200, Peter J. Philipp wrote:
> Hi,
> 
> You don't check for malloc failure.  I've made a patch that is possibly 
> wrong but it saves the program from SIGSEGV and replaces it with SIGABRT.
> 
> -peter
> 

Thanks for searching and finding those locations. :)

But I have a question:
Not all of them (only had a brief look at the patch) look to be in a
'safe' startup/shutdown state but code wich is run within the normal
operation. Wouldn't it be better to handle those cases in a diffrent way
because abort() will kill the process? Currently if it derefences NULL
the kernel will kill the process (very likely). This patch would improve
the situation because the behavor will be more defined wich is a big pro
already.

-- 
Philipp.
 (Rah of PH2)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20110429/d28ed4b1/attachment.pgp 


More information about the Icecast-dev mailing list