]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Add sanity check of tar "uid, "gid" and "mtime" fields
authorJan Osusky <Jan.Osusky@iblsoft.com>
Mon, 14 Nov 2016 10:24:35 +0000 (11:24 +0100)
committerJan Osusky <Jan.Osusky@iblsoft.com>
Mon, 14 Nov 2016 10:24:35 +0000 (11:24 +0100)
commit337c58686562aa09e961cb63ae07e0edff557701
tree613418c34348194c3668092bcfde649f4776fe46
parent944b8aab7c9cf4417a6d2384b37ad35d30309a2d
Add sanity check of tar "uid, "gid" and "mtime" fields

Sometimes a bz2 file is identified as tar.bz2, i.e. a chunk of
raw data may look like a tar header (metadata block).
To reduce chance of such false positive, the format of uid, gid
and mtime field is checked. This fields are expected to contain
octal numbers. In fact, also space and '\0' are allowed - perhaps
I am too liberal.
libarchive/archive_read_support_format_tar.c