]> git.ipfire.org Git - thirdparty/libarchive.git/commit
A correct fix for Issue 404: Read past end of string parsing fflags
authorTim Kientzle <kientzle@acm.org>
Sat, 7 Feb 2015 21:44:34 +0000 (13:44 -0800)
committerTim Kientzle <kientzle@acm.org>
Sat, 7 Feb 2015 21:53:32 +0000 (13:53 -0800)
commit90632371f89d1390bf71dd31ae1c842b9110bea2
treefd7a77e9dbe861695c3b5a3c4edeb1b310b6f252
parente8a2e4d2e6b450a239bb8f9d74239fa434bf7d35
A correct fix for Issue 404: Read past end of string parsing fflags

The previous fix actually broke the fflag parsing.  We
cannot use strcmp() here because we're comparing a null-terminated
string to a part of another string.

This fix explicitly tracks the various string lengths and
checks that they match before calling memcmp() or wmemcmp().
That avoids any buffer overrun without breaking the parser.
libarchive/archive_entry.c