str: Skip only up to one-past-the-end in ss_tokenize().
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 18 Feb 2012 19:03:01 +0000 (11:03 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 18 Feb 2012 19:03:23 +0000 (11:03 -0800)
commitc60b1277e785531b1cfc26b48697af7f942561d3
tree079dcb80bbd508bed42fe2428271fb0908f07ae2
parentc83204c09df1d86c3a453d9f812695de1f7f559c
str: Skip only up to one-past-the-end in ss_tokenize().

If ss_tokenize() was called with '*save_idx' positioned at
one-past-the-end of a string, it would continue to advance it past
that point, which is surprising.  This avoids doing that.

Found by Valgrind.
Reported-by: John Darrington <john@darrington.wattle.id.au>
src/libpspp/str.c
tests/data/sys-file-reader.at