aboutsummaryrefslogtreecommitdiff
path: root/pd/src/m_binbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'pd/src/m_binbuf.c')
-rw-r--r--pd/src/m_binbuf.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/pd/src/m_binbuf.c b/pd/src/m_binbuf.c
index fbae4be5..06c3c6a2 100644
--- a/pd/src/m_binbuf.c
+++ b/pd/src/m_binbuf.c
@@ -490,11 +490,12 @@ t_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av, int tonew)
* whenever this happened, enable this code
*/
substr=strchr(str, '$');
- if(substr)
- {
- strncat(buf2, str, (substr-str));
- str=substr+1;
- }
+ if (!substr || substr-str >= MAXPDSTRING)
+ return (s);
+
+ strncat(buf2, str, (substr-str));
+ str=substr+1;
+
#endif
while((next=binbuf_expanddollsym(str, buf, dollarnull, ac, av, tonew))>=0)
@@ -527,6 +528,7 @@ t_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av, int tonew)
}
}
done:
+ post("realize %s->%s", s->s_name, buf2);
return (gensym(buf2));
}