diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index cb62e87a..5f903378 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -17,6 +17,10 @@ * src/svf/svf_bison.y: Avoid calling strlen() multiple times on the same string. Fix by Frans Meulenbroeks. + * src/svf/svf_bison.y: Use known string length to call strcpy() rather than + strcat(). This avoids having to rescan for the end of the string. Fix by + Frans Meulenbroeks. + 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 979c5836..92aacc21 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) { - strcat ($1.buf, $2); + strcpy ($1.buf + $1.strlen, $2); $1.strlen += frag_len; } free ($2);