#11 libmodplug crash on certain MPEG files


libmodplug 0.8.4 crashes when fed certain MPEG files. This is a problem in some scenarios when MPEG files are named as *.mod and media players feed them to libmodplug, such as described in https://bugzilla.redhat.com/show_bug.cgi?id=483146

#0 0x0000003308632f05 in raise () from /lib64/libc.so.6
#1 0x0000003308634a73 in abort () from /lib64/libc.so.6
#2 0x0000003308672438 in __libc_message () from /lib64/libc.so.6
#3 0x00000033086ff4c7 in __fortify_fail () from /lib64/libc.so.6
#4 0x00000033086fd370 in __chk_fail () from /lib64/libc.so.6
#5 0x00000033086fc57d in __strncpy_chk () from /lib64/libc.so.6
#6 0x0000003307641faf in PAT_Load_Instruments () from /usr/lib64/libmodplug.so.0
#7 0x000000330763a120 in CSoundFile::ReadABC () from /usr/lib64/libmodplug.so.0
#8 0x000000330760f183 in CSoundFile::Create () from /usr/lib64/libmodplug.so.0

Full backtrace is in the above bugzilla.redhat.com bug report. One sample file which triggers a crash is http://samples.mplayerhq.hu/A-codecs/MP3/mpeg_layer1_audio.mpg (although this might be a different crash than the one referenced in the above bug report; both involve CSoundFile::ReadABC() though).

The expected result would be a graceful failure to open such a file instead of a crash.


  • Konstanty

    Konstanty - 2009-04-14
    • assigned_to: nobody --> metaplasma
  • Konstanty

    Konstanty - 2009-04-14

    Looks like this is fixable in the TestABC function - and I will release a new libmodplug version (0.8.5) which addresses this, and other things patched in CVS since 0.8.4.

  • Konstanty

    Konstanty - 2009-04-14

    Previously the only test ABC loading did was to check for a line which started with "K: " (key information in ABC format). I have added a new check to see if the first 2 characters are valid ABC characters (alphanumeric, space or :, %).

    [Some file format information: http://abcnotation.org.uk/\]

  • Konstanty

    Konstanty - 2009-04-15
    • status: open --> closed-fixed
  • Konstanty

    Konstanty - 2009-04-15

    Hopefully fixed for now - if other files do this will need to make the TestABC function more robust.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks