Michal ??iha?? <[EMAIL PROTECTED]> wrote: > Package: mpd > Version: 0.12.0-1 > Followup-For: Bug #390417 > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > After upgrade, on init script run, I got mentioned error message: > > mpd: /tmp/buildd/mpd-0.12.0/./src/utils.c:126: xmalloc: Assertion > `__builtin_expect (!!(size), 1)' failed. > > Because of this MPD fails to start using init script. > > If you're interested in file causing this error, it is (temporarily) > available on my server: http://new.cihar.com/05-Poluce.mp3 > > - -- > Michal ??iha?? | http://cihar.com | http://blog.cihar.com > > - -- System Information: > Debian Release: testing/unstable > APT prefers unstable > APT policy: (500, 'unstable'), (99, 'experimental') > Architecture: i386 (i686) > Shell: /bin/sh linked to /bin/bash > Kernel: Linux 2.6.17-2-686 > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) > > Versions of packages mpd depends on: > ii libao2 0.8.6-4 Cross Platform Audio Output > Librar > ii libasound2 1.0.12-1 ALSA library > ii libaudiofile0 0.2.6-6 Open-source version of SGI's > audio > ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries > ii libflac7 1.1.2-5 Free Lossless Audio Codec - > runtim > ii libid3tag0 0.15.1b-8 ID3 tag reading library from the > M > ii libmad0 0.15.1b-2.1 MPEG audio decoder library > ii libmikmod2 3.1.11-a-6 A portable sound library > ii libmpcdec3 1.2.2-1 Musepack (MPC) format library > ii libogg0 1.1.3-2 Ogg Bitstream Library > ii libshout3 2.2.2-1 MP3/Ogg Vorbis broadcast > streaming > ii libspeex1 1.1.12-2 The Speex Speech Codec > ii libtheora0 0.0.0.alpha7-1 The Theora Video Compression > Codec > ii libvorbis0a 1.1.2-1 The Vorbis General Audio > Compressi > ii libvorbisenc2 1.1.2-1 The Vorbis General Audio > Compressi > ii libvorbisfile3 1.1.2-1 The Vorbis General Audio > Compressi > ii zlib1g 1:1.2.3-13 compression library - runtime
Warren, can you look at the below message and patch? I'm not familiar with all the details of mp3 playback. I will tell jat on IRC, too. ------------------------------------------------------------------------ mp3_plugin: don't allocate frameOffset and times unless we can have maxFrames ref: http://bugs.debian.org/390417 This allows us to add the file referred to in the above bug report into the database without tripping on an assertion. Of course, this is hiding/working around another bug, as even dropping the asserts from xmalloc entirely seem to make it unable to *play* the file in question... --- src/inputPlugins/mp3_plugin.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index f0744f2..be7ceca 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -682,9 +682,10 @@ static int decodeFirstFrame(mp3DecodeDat } } - data->frameOffset = xmalloc(sizeof(long) * data->maxFrames); - data->times = xmalloc(sizeof(mad_timer_t) * data->maxFrames); - + if (data->maxFrames) { + data->frameOffset = xmalloc(sizeof(long) * data->maxFrames); + data->times = xmalloc(sizeof(mad_timer_t) * data->maxFrames); + } return 0; } -- Eric Wong
signature.asc
Description: Digital signature

