#409 [makefilename] patch reliably segfaults

puredata (375)
Chris McCormick

Attached is a patch that reliably segfaults Pd.


  • while the docs are a bit confusion about this, [makefilename] really can only handle a _single_ format specifier;

    so using a format-string like "%s-%s" is illegal.

    however, Pd should never segfault

  • attached is a patch that checks whether there are multiple format specifiers, and if so, complains and refuses to work.
    this effectively prevents the crash (though it still does not enable multiple format specifiers)

    the patch applies to todays git master.
    raised priority since it is a crasher bug.

    • labels: 680482 --> puredata
    • milestone: 1022526 -->
    • priority: 5 --> 7
    • assigned_to: nobody --> millerpuckette
  • This is rather confusingly written (and badly indented)... I'd suggest having makefilename_scanformat()
    simply scan through the string in one pass. I can hack on this later if necessary.

  • ad indentation: true, i really have to fix this once! are there any coding guidelines available (preferrably within the pd/ directory) that explicits the "correct" formatting?

    ad confusion: hey, i just copied the original code (;-)) into a function that can be called multiple times

    anyhow, it would be good to have it fixed in _some_ way (so please do hack on this later)



Cancel   Add attachments