Signed-off-by: Frans Meulenbroeks <[email protected]>
---
urjtag/src/svf/svf_bison.y | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/urjtag/src/svf/svf_bison.y b/urjtag/src/svf/svf_bison.y
index a8ce7dc..979c583 100644
--- a/urjtag/src/svf/svf_bison.y
+++ b/urjtag/src/svf/svf_bison.y
@@ -303,7 +303,8 @@ hexa_num_sequence
| hexa_num_sequence HEXA_NUM_FRAGMENT
{
#define REALLOC_STEP (1 << 16)
- size_t req_len = $1.strlen + strlen ($2);
+ size_t frag_len = strlen ($2);
+ size_t req_len = $1.strlen + frag_len;
if ($1.buflen <= req_len) {
size_t newlen = req_len - $1.buflen < REALLOC_STEP ?
$1.buflen + REALLOC_STEP : req_len + 1;
@@ -312,7 +313,7 @@ hexa_num_sequence
}
if ($1.buf != NULL) {
strcat ($1.buf, $2);
- $1.strlen += strlen ($2);
+ $1.strlen += frag_len;
}
free ($2);
$$ = $1;
--
1.7.0.4
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development