]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Issue 550: Fix out-of-bounds read in mtree.
authorTim Kientzle <kientzle@acm.org>
Sun, 3 Apr 2016 18:03:22 +0000 (11:03 -0700)
committerTim Kientzle <kientzle@acm.org>
Sun, 3 Apr 2016 18:03:22 +0000 (11:03 -0700)
commit64d56286ccc5d26d1eec1ef835e8e671f3ba6b84
tree4c949d3471bece805ffaf23800204c32943b8706
parent4cadc95812e147d6cfc65595c81dc484beaa5339
Issue 550:  Fix out-of-bounds read in mtree.

The mtree parser scanned from the end of the string to identify
the filename when the filename is the last element of the line.
If the filename was the entire line, the logic would scan back
to before the start of the string.

The revised logic scans from the beginning of the string
and remembers the last separator position to locate the
trailing filename.
libarchive/archive_read_support_format_mtree.c