lexer: Check that 'read' function in lex_source returns valid value.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 6 May 2012 05:07:34 +0000 (22:07 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 6 May 2012 15:07:10 +0000 (08:07 -0700)
commit0838c7ce8528a241fd6bb422767e187af4b5d9a7
tree53e6d97b5e68fa13a7e9bac95ff844ff5916bad7
parent6fb50290892e920da3af95489bafe74541e55198
lexer: Check that 'read' function in lex_source returns valid value.

A 'read' function may only read as many bytes as the size of the
buffer passed into it, but the caller didn't check, which made an
actual violation of this invariant hard to diagnose.
src/language/lexer/lexer.c