From f889943d84354c51f35c0155e70db1a1ba82f3d7 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 20 Aug 2010 03:49:48 +0000 Subject: accepted in git commit 31eaf7b400498297b627773e7609161d6ec08dd7 svn path=/trunk/; revision=13863 --- packages/patches/fix_gui_%_crash-0.42-4.patch | 29 --------------------------- 1 file changed, 29 deletions(-) delete mode 100644 packages/patches/fix_gui_%_crash-0.42-4.patch (limited to 'packages/patches') diff --git a/packages/patches/fix_gui_%_crash-0.42-4.patch b/packages/patches/fix_gui_%_crash-0.42-4.patch deleted file mode 100644 index 02c39313..00000000 --- a/packages/patches/fix_gui_%_crash-0.42-4.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: x_gui.c -=================================================================== ---- x_gui.c (revision 11016) -+++ x_gui.c (working copy) -@@ -49,6 +49,9 @@ - { - char buf[4*MAXPDSTRING]; - char namebuf[80]; -+ char sprintfbuf[MAXPDSTRING]; -+ char *afterpercent; -+ t_int afterpercentlen; - t_gfxstub *x; - t_symbol *s; - /* if any exists with matching key, burn it. */ -@@ -71,7 +74,13 @@ - x->x_key = key; - x->x_next = gfxstub_list; - gfxstub_list = x; -- sprintf(buf, cmd, s->s_name); -+ /* only replace first %s so sprintf() doesn't crash */ -+ afterpercent = strchr(cmd, '%') + 2; -+ afterpercentlen = afterpercent - cmd; -+ strncpy(sprintfbuf, cmd, afterpercentlen); -+ sprintfbuf[afterpercentlen] = '\0'; -+ sprintf(buf, sprintfbuf, s->s_name); -+ strncat(buf, afterpercent, (4*MAXPDSTRING) - afterpercentlen); - sys_gui(buf); - } - -- cgit v1.2.1