Fixed two buffer handling errors in vector.c
- remove() would read one-past array bounds. - resize() would fail if the initial size was 1, because it multiplied by 1.75 and truncated the resulting value. The buffer would always remain at size 1, but elements would repeatedly be appended (via insert()) causing a crash.
Showing
tests/t0004-vector.c
0 → 100644
Please
register
or
sign in
to comment