]> granicus.if.org Git - libevent/commit
Fix incorrect results from evbuffer_search_eol(EOL_LF)
authorNick Mathewson <nickm@torproject.org>
Mon, 6 Jun 2011 19:11:28 +0000 (15:11 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 6 Jun 2011 19:11:28 +0000 (15:11 -0400)
commit4461f1a096621db8b24edafac409e0f05072d35a
tree00fac3c75ee8b9f1c3d3d1f7d72c452bb465e545
parent60c1426f2c16ffe1e4e14b4779e335d824f64aee
Fix incorrect results from evbuffer_search_eol(EOL_LF)

Our evbuffer_strchr() function [which was only used for
search_eol(EOL_LF) could give incorrect results if it found its answer
in the first chunk but didn't start searching from the front of the
chunk.

Also, this patch adds unit tests for evbuffer_search_eol, particularly
in those cases that evbuffer_readln() tests didn't exercise.
buffer.c
test/regress_buffer.c