Author Topic: openmpt123 --render crashes on certain files (realloc(): invalid next size)  (Read 615 times)

Offline LivingInTheBits

  • Shy artist
  • Posts: 4
  • Operating System: Linux
so i have this nice file (among others) which crashes only with the option --render - playing it works fantastic.

Code: [Select]
$ openmpt123 --force --render 1993.mod

openmpt123 v0.5.4, libopenmpt 0.5.4+r13932.pkg (OpenMPT 1.29.06.00 https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.4@13932 (2020-11-29T15:01:39.790705Z) clean-pkg)
Copyright (c) 2013-2020 OpenMPT developers <https://lib.openmpt.org/>

Filename...: 1993.mod
Size.......: 192kB
Type.......: mod (ProTracker MOD (M.K.))
Tracker....: Generic ProTracker or compatible
Title......: <<<<<< 1993 >>>>>>
Duration...: 08:50.340
Subsongs...: 1
Channels...: 4
Orders.....: 56
Patterns...: 41
Instruments: 0
Samples....: 31

realloc(): invalid next size
Abgebrochen (Speicherabzug geschrieben)

as said, this happens with several other files too, but many go without issues.

I attach the file for testing.

i also tested it with the svn version (0.6.0-pre.5)

is there anything i can do or needs this fixing?

Thank you a lot for this wonderful software!
« Last Edit: February 06, 2021, 21:48:01 by manx »

Offline manx

  • OpenMPT Developers
  • *****
  • Posts: 289
Which linux distribution are you using? What's the libsndfile version?

Offline LivingInTheBits

  • Shy artist
  • Posts: 4
  • Operating System: Linux
i'm on arch: 5.10.13-arch1-1

libsndfile 1.0.28-3

Offline manx

  • OpenMPT Developers
  • *****
  • Posts: 289
i'm on arch: 5.10.13-arch1-1
libsndfile 1.0.28-3

is there anything i can do or needs this fixing?

You can complain very loudly to arch maintainers for shipping libsndfile with known exploitable bugs of which one was fixed by me 3,5 years ago. See https://github.com/libsndfile/libsndfile/issues/292 for the bug report and https://github.com/libsndfile/libsndfile/commit/cf7a8182c2642c50f1cf90dddea9ce96a8bad2e8 for the fix.

You could also use openmpt123 --render with --output-type flac (no headroom >0dBfs) or --output-type raw (no metadata) as a work-around, or try some other than wav output format supported via libsndfile.

Offline LivingInTheBits

  • Shy artist
  • Posts: 4
  • Operating System: Linux
hehe - ok, thank you very very much - the hint with flac is working! wonderful! thank you a lot (i will look if i can complain at the maintainers of arch =) )

Offline LivingInTheBits

  • Shy artist
  • Posts: 4
  • Operating System: Linux
added your info to another vulnerability-task in the bugtracker ... sadly nobody seems to feel responsible =)