Not Big Endian safe
Status: Beta
Brought to you by:
ring0_mipt
Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426699
mp3val is not big endian safe.
Lines like
*((unsigned char *)&bitrate_index)=((baseptr[index+2])>>4)&0x0F;
(329: mpegparse.cpp)
make the Program crash on PowerPC (and every other big endian architecture).
For bitrate of 128 the bitrate_index should point to 9, but it points to
150994944.
I also checked version 1.7, but it has the same problems.
Same here with 0.1.8 on Debian/powerpc:
The coredump has:
(gdb) bt #0 0x100027c0 in ValidateMPEGFrame (baseptr=baseptr@entry=0xb77ff000 , index=index@entry=1242, mpginfo=mpginfo@entry=0xbfe701ac) at mpegparse.cpp:339 #1 0x10003600 in ValidateFile (baseptr=0xb77ff000 , iFileSize=41075, mpginfo=0xbfe701ac, out=0x10017500, filename=0x100175fc "/tmp/file.mp3", fix=<optimized out="">, hFile=-1) at mpegparse.cpp:106 #2 0x10001ed0 in ProcessFile (szFileName=szFileName@entry=0xbfe7229e "file.mp3", szLogFileName=<optimized out="">) at main.cpp:201 #3 0x1000147c in main (argc=2, argv=<optimized out="">) at main.cpp:157 </optimized></optimized></optimized>Oh, this is actually a duplicate of [#7], reported even two years earlier...
Related
Bugs: #7