]> git.ipfire.org Git - thirdparty/libarchive.git/commit
warc: Prevent signed integer overflow (#2568)
authorTobias Stoeckmann <stoeckmann@users.noreply.github.com>
Sun, 6 Apr 2025 22:24:13 +0000 (00:24 +0200)
committerGitHub <noreply@github.com>
Sun, 6 Apr 2025 22:24:13 +0000 (15:24 -0700)
commitef093729521fcf73fa4007d5ae77adfe4df42403
treee1097994f7397e4f9b4bc5a13b1937c05dd3ec75
parentb580147278c56f7a3fa89dbc29715c1aff5a48a9
warc: Prevent signed integer overflow (#2568)

If a warc archive claims to have more than INT64_MAX - 4 content bytes,
the inevitable failure to skip all these bytes could lead to parsing
data which should be ignored instead.

The test case contains a conversation entry with that many bytes and if
the entry is not properly skipped, the warc implementation would read
the conversation data as a new file entry.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Makefile.am
libarchive/archive_read_support_format_warc.c
libarchive/test/test_read_format_warc.c
libarchive/test/test_read_format_warc_incomplete.warc.uu [new file with mode: 0644]