Please sign in to comment.
fixes intermittent glitch in esl_buffer_utest detected by valgrind
esl_buffer.c::buffer_counttok line ~1859 checks for \r\n newline, because it may need to back nc up by one. However, if input ends with token, [bf->pos+nc] is off the end of the input, so the test for \n there needs some protection. Add check for bf->pos+nc < bf->n.
- Loading branch information...