mirror of
git://git.proxmox.com/git/pxar.git
synced 2024-12-22 21:33:50 +03:00
decoder: fix size check in read_simple_entry
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
59e6f6798b
commit
15e0bfe53c
@ -501,12 +501,12 @@ impl<T: SeqRead> DecoderImpl<T> {
|
||||
&mut self,
|
||||
what: &'static str,
|
||||
) -> io::Result<U> {
|
||||
if self.current_header.content_size() != (size_of::<T>() as u64) {
|
||||
if self.current_header.content_size() != (size_of::<U>() as u64) {
|
||||
io_bail!(
|
||||
"bad {} size: {} (expected {})",
|
||||
what,
|
||||
self.current_header.content_size(),
|
||||
size_of::<T>(),
|
||||
size_of::<U>(),
|
||||
);
|
||||
}
|
||||
(&mut self.input as &mut dyn SeqRead).seq_read_entry().await
|
||||
|
Loading…
Reference in New Issue
Block a user