[PD-dev] [ pure-data-Patches-1836228 ] [patch] simplify pd_makeversion() in src/s_main.c
SourceForge.net
noreply at sourceforge.net
Fri Nov 23 20:24:21 CET 2007
Patches item #1836228, was opened at 2007-11-21 23:37
Message generated for change (Comment added) made by eighthave
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1836228&group_id=55736
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
Group: bugfix
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Russell Bryant (russellbryant)
>Assigned to: Miller Puckette (millerpuckette)
Summary: [patch] simplify pd_makeversion() in src/s_main.c
Initial Comment:
This minor patch simplifies the pd_makeversion() function in src/s_main.c.
It replaces the sprintf / malloc / strcpy, with the equivalent single call to asprintf. It also provides the side benefit of removing the length limitation introduced by the intermediary stack buffer (with bounds that weren't being checked).
----------------------------------------------------------------------
>Comment By: Hans-Christoph Steiner (eighthave)
Date: 2007-11-23 14:24
Message:
Logged In: YES
user_id=27104
Originator: NO
Funny, I originally submitted the patch with this function and it included
asprintf(). Miller accepted the patch, but replaced the asprintf() with
the sprintf/malloc/strcpy combo, with only this comment:
"modified to avoid the effete asprintf() call, then took for 0.40"
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1836228&group_id=55736
More information about the Pd-dev
mailing list