Issue 747 (and others?): Avoid OOB read when parsing multiple long lines 73/134773/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 20 Jun 2017 04:00:28 +0000 (13:00 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 20 Jun 2017 04:06:35 +0000 (13:06 +0900)
commit824156755ae0fb210742925a2cbb16f14aac45c4
treec46600bc8bc2df6f149d62511bba7f0d13ed4c3b
parent7799cabd374113a9aae8b9b8c79d09a056540115
Issue 747 (and others?): Avoid OOB read when parsing multiple long lines

The mtree bidder needs to look several lines ahead
in the input.  It does this by extending the read-ahead
and parsing subsequent lines from the same growing buffer.
A bookkeeping error when extending the read-ahead would
sometimes lead it to significantly over-count the
size of the line being read.

Change-Id: I3f73c4eecfb3c86ef273666a7b1ed111ceb977fa
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
libarchive/archive_read_support_format_mtree.c