diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 5f903378..aeb7e7ca 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -21,6 +21,9 @@ strcat(). This avoids having to rescan for the end of the string. Fix by Frans Meulenbroeks. + * src/svf/svf_bison.y: Avoid further overhead by using memcpy() with all + known lengths rather than strcpy(). + 2010-08-26 Mike Frysinger * src/tap/cable/gpio.c: Rewrite to use raw file descriptors when working with diff --git a/urjtag/src/svf/svf_bison.y b/urjtag/src/svf/svf_bison.y index 92aacc21..10f34a82 100644 --- a/urjtag/src/svf/svf_bison.y +++ b/urjtag/src/svf/svf_bison.y @@ -312,7 +312,7 @@ hexa_num_sequence $1.buflen = newlen; } if ($1.buf != NULL) { - strcpy ($1.buf + $1.strlen, $2); + memcpy ($1.buf + $1.strlen, $2, frag_len + 1); $1.strlen += frag_len; } free ($2);