mpd/src/inputPlugins
Eric Wong 90847fc881 Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors
I'm checking for zero-size allocations and assert()-ing them,
so we can more easily get backtraces and debug problems, but we'll
also allow -DNDEBUG people to live on the edge if they wish.

We do not rely on errno when checking for OOM errors because
some implementations of malloc do not set it, and malloc
is commonly overridden by userspace wrappers.

I've spent some time looking through the source and didn't find any
obvious places where we would explicitly allocate 0 bytes, so we
shouldn't trip any of those assertions.

We also avoid allocating zero bytes because C libraries don't
handle this consistently (some return NULL, some not); and it's
dangerous either way.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4690 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26 06:25:57 +00:00
..
_flac_common.c fix Replay Gain reading for FLAC and OggFLAC 2006-08-22 06:36:56 +00:00
_flac_common.h Add mpd-indent.sh 2006-07-20 18:53:56 +00:00
_ogg_common.c inputPlugins/_ogg_common.c: check for read errors correctly 2006-08-20 10:13:50 +00:00
_ogg_common.h Add mpd-indent.sh 2006-07-20 18:53:56 +00:00
aac_plugin.c Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors 2006-08-26 06:25:57 +00:00
audiofile_plugin.c audiofile_plugin: use afSetVirtualSampleFormat, too 2006-08-24 21:59:19 +00:00
flac_plugin.c trivial: labels should be on the left-most column, no tabbing 2006-08-20 10:13:54 +00:00
mod_plugin.c Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors 2006-08-26 06:25:57 +00:00
mp3_plugin.c Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors 2006-08-26 06:25:57 +00:00
mp4_plugin.c Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors 2006-08-26 06:25:57 +00:00
mpc_plugin.c mpc_plugin: fix seeking bug 2006-08-08 00:56:05 +00:00
oggflac_plugin.c trivial: labels should be on the left-most column, no tabbing 2006-08-20 10:13:54 +00:00
oggvorbis_plugin.c oggvorbis_plugin.c: update message to match changed function name 2006-08-20 10:13:59 +00:00