sys-file-reader: Avoid read past end of buffer.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 18 Feb 2012 19:01:11 +0000 (11:01 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 18 Feb 2012 19:03:23 +0000 (11:03 -0800)
commitc83204c09df1d86c3a453d9f812695de1f7f559c
tree8fd70b35c52cef862f62692f33c93e43398ab2ed
parenteaf3122f0cfa7b6d42254653bed8433c52bc63e2
sys-file-reader: Avoid read past end of buffer.

The "unexpected label source in mrsets" test caused a read past the
end of the input buffer in text_parse_counted_string().  This fixes
the problem.

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