From 14858818d3cf38886aef5089982522feb9a8edfb Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 8 Oct 2008 21:59:36 -0500 Subject: [PATCH] changed strcpy to memmove The areas pointed to by strcpy() cannot overlap, so we need to use memmove() in case that happens. Thanks to Chris Brannon for pointing this out. --- softsynth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softsynth.c b/softsynth.c index bb2e2f0..0a7f81e 100644 --- a/softsynth.c +++ b/softsynth.c @@ -168,7 +168,7 @@ void main_loop(struct synth_t *s) if (cp) { queue_clear(); stop_speech(); - strcpy(buf, cp+1); + memmove(buf, cp+1, strlen(cp + 1)); length = strlen(buf); } process_buffer(s, buf, length);