Re: You don't check for malloc failure
Philipp Schafft <[email protected]>
| Newsgroups | gmane.comp.audio.icecast.devel |
|---|---|
| Message-ID | <[email protected]> |
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) _______________________________________________ Icecast-dev mailing list [email protected] http://lists.xiph.org/mailman/listinfo/icecast-dev
signature.asc
(application/pgp-signature, 482 B)
-----BEGIN PGP SIGNATURE----- Comment: Because it's your freedom iQEVAwUATbqAG2CSpmW8W5B8AQIgPQgAj9mHJgWzqKSxxG2bsOVS5rxMJ9lN3HD5 0qRGdb8scCUA82Mlv86sfJ5UAPTx8C4vMIDDk7niBQ8he8Rvplv8WEeNBpz7F0YU n4IeSwUNdnxaM7C/Gc4caoY7vSjm6xog0fPJLeJV5RXHq18tJbqaymH1+PvdTDF7 cJO8PlYbKKbWHv6UuVEfCiZ5ZRS0Uo9ZCbhX8rYdcAIWC0DkjvXc3/D/XvOaCUYf 0ZrkHRipydzb0yr9Fw6/ZsAr8oS3VWe5dlRX1ufmZGwcfTuAtv4A7jJnFsDHDMRF XwGR1+vRpvvwRxl+E6N73EtX3ZCeaqfd6k72ajboTzAunzrVFTdVmA== =1cbQ -----END PGP SIGNATURE-----