Fix dereference to reallocated pointer in data-parser.c (parse_delimited_no_span...
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 12 Sep 2015 10:38:50 +0000 (12:38 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 12 Sep 2015 10:38:50 +0000 (12:38 +0200)
commitad53d0d95c54eb5c3551b15c6a33c6498dab184c
treea8de7d2857f078dac774f34d73b27e71d85a8fee
parentdaa1fe88e7ec00f21792fc9fdda0599caf50073a
Fix dereference to reallocated pointer in data-parser.c (parse_delimited_no_span, parse_delimited_span)

The parse_delimited_span and parse_delimited_no_span functions were
accessing a pointer from within a loop, but the pointer had been
initialised outside the loop.  However the loop itself was deallocating
the memory referenced by that pointer.

This change initialises the pointer within the loop so as to avoid
a potential crash here.
src/language/data-io/data-parser.c