Browse Source

numparam/spicenum.c, stripbraces(), bug fix

overwriting SPICE_DSTRING `dstr_p' may invalidate `s'

This bug was injected with the introduction of SPICE_DSTRING in :
> commit 76feebbbfa
> Date:   Thu Feb 25 21:43:03 2010 +0000
>     various bug fixes
pre-master-46
rlar 8 years ago
parent
commit
f0159cbd0b
  1. 3
      src/frontend/numparam/spicenum.c

3
src/frontend/numparam/spicenum.c

@ -149,8 +149,7 @@ stripbraces(SPICE_DSTRINGPTR dstr_p)
cadd(&tstr, ' ');
i = spice_dstring_length(&tstr);
pscopy(dstr_p, s, j, ls);
sadd(&tstr, s);
sadd(&tstr, s + j);
scopyd(dstr_p, &tstr);
s = spice_dstring_value(dstr_p);
ls = spice_dstring_length(dstr_p);

Loading…
Cancel
Save