]> git.ipfire.org Git - thirdparty/tar.git/commit
Check if the dumpdir read from the archive is well-formed before using it. master
authorSergey Poznyakoff <gray@gnu.org>
Tue, 21 Jul 2026 19:49:04 +0000 (22:49 +0300)
committerSergey Poznyakoff <gray@gnu.org>
Tue, 21 Jul 2026 19:49:04 +0000 (22:49 +0300)
commit87819f9f0a6c2d546c7936123fce5eecb6e6f149
tree79d77ac063c2adab0afa39d5d7c5d3b9e041d7df
parent08c3fc2e9337094aff01a511170fd35fdb8f1ee3
Check if the dumpdir read from the archive is well-formed before using it.

* src/common.h (dumpdir_ok): New proto.
* src/incremen.c (dumpdir_ok): Take size as the second argument.
Verify if the last byte is 0 and the dumpdir contains 0 or more
nul-terminated strings.
(get_gnu_dumpdir): Check if the obtained dumpdir is ok. Clear the
is_dumpdir flag if it is not.
* src/xheader.c (dumpdir_decoder) Verify if the obtained dumpdir is
ok.
src/common.h
src/incremen.c
src/xheader.c