]> git.proxmox.com Git - pxar.git/commitdiff
header: add size checks
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 12 Jun 2020 07:21:39 +0000 (09:21 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 12 Jun 2020 07:46:01 +0000 (09:46 +0200)
to catch
- headers with full_size < size_of::<Header>
- headers with content_size > header-specific limit

both should in practice only occur for corrupted streams/archives, but
panic-ing/attempting to allocate huge amounts of memory should be
avoided even for those.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>

No differences found