Menu

#12 sidplayfp: Missing initializer in IniConfig::clear()?

None
closed
None
5
2014-06-08
2014-05-31
No

This applies to sidplayfp 1.2.0. Please disregard if it has already been fixed in the development version.

It looks to me as if InitConfig::clear() should initialize emulation_s.engine to NULL. Otherwise, there will be uninitialized data treated as a string during startup, which can cause the program to crash.

I originally reported this in the Debian package for sidplayfp [1] (which, apparently because of the compiler flags used, always crashes for me) but since I haven't heard anything from there in a while, and since it doesn't appear to be a Debian-specific bug, I'll report it here as well.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744794

Related

News: 2014/06/released-sidplayfp-121

Discussion

  • Leandro Nini

    Leandro Nini - 2014-06-01
    • assigned_to: Leandro Nini
    • Group: -->
     
  • Leandro Nini

    Leandro Nini - 2014-06-01

    Thank you, applied in svn (r1549), pending for next release.

     
  • Leandro Nini

    Leandro Nini - 2014-06-01
    • status: open --> pending
     
  • Torbjörn Andersson

    Thanks for the quick response! I'm not sure of the exact compiler flags Debian uses, so I haven't been able to reproduce the crash when building from the source myself. But I can at least see that with the fix, Valgrind no longer complains about uninitialized values.

     
  • Leandro Nini

    Leandro Nini - 2014-06-08

    It's probably some hardening flag that triggers a crash when reading outside the allocated memory area, I couldn't reproduce it myself too.
    Anyway it's fixed in 1.2.1.

     
  • Leandro Nini

    Leandro Nini - 2014-06-08
    • status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB