Fix potential read beyond available input data when processing \r in some states. What happened was that, given \rabc, we would advance past the \r, then read at current_offset + len (len == 1). I.E. read 'b' instead of 'a'. If the data in the inputstream's internal buffer happened to end immediately after the \r, then we'd read past the end of the buffer thanks to a bug in lpu_inputstream_peek which was fixed in r5965. In any case, we'd still be looking at the wrong character when looking for CRLF pairs.
Fix potential read beyond available input data when processing \r in some states.
What happened was that, given \rabc, we would advance past the \r, then read at current_offset + len (len == 1). I.E. read 'b' instead of 'a'. If the data in the inputstream's internal buffer happened to end immediately after the \r, then we'd read past the end of the buffer thanks to a bug in lpu_inputstream_peek which was fixed in r5965. In any case, we'd still be looking at the wrong character when looking for CRLF pairs.

All regression tests now pass again.

svn path=/trunk/hubbub/; revision=5967

Achal-Aggarwal/hibbub,prepare/netsurf_libhubbub,adamwight/wmf-parsoid-libhubbub,adamwight/wmf-parsoid-libhubbub,adamwight/wmf-parsoid-libhubbub,servo/libhubbub,Achal-Aggarwal/hibbub,prepare/netsurf_libhubbub,prepare/netsurf_libhubbub,prepare/netsurf_libhubbub,servo/libhubbub,servo/libhubbub,prepare/netsurf_libhubbub,Achal-Aggarwal/hibbub,servo/libhubbub,prepare/netsurf_libhubbub,servo/libhubbub,Achal-Aggarwal/hibbub,adamwight/wmf-parsoid-libhubbub,adamwight/wmf-parsoid-libhubbub