Patches item #1688540, was opened at 2007-03-26 12:33 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1688540...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata-dev Group: bugfix Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stephen Sinclair (radarsat1) Assigned to: Nobody/Anonymous (nobody) Summary: fix makefilename segfault when wrong argument type received
Initial Comment: Currently, Pd segfaults if the "makefilename" object is configured to receive a symbol ("%s") and it receives a float argument.
This patch uses strstr() to check if the sprintf string is going to accept a float, like so:
strstr(s->s_name, "%s")==0
The result is saved in the t_makefilename structure. It is recalculated on the "set" message.
When the wrong message type is received, a 0 or "" string is substituted, respectfully.
While it is unfortunate to do a string search like this, it is not very good to have Pd segfaulting, so I see no alternative.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1688540...