I have a problem with decoding my .7z sample. I get an "premature eof" error when trying to decode a piece of data.
The error is caused by checking status against Status::StreamEnd while it is actually is Status::Ok.
My case:
First read: input.len()=326, buf.len()=906, read=906, consumed=326, eof=false, status=Ok
Second read: input.len()=0, buf.len()=32, read=0, consumed=0, eof=true, status=Ok
After the second read I get the error. I've added a check whether status is not Status::Ok when dealing with an empty input (eof=true) before returning an error.
I have a problem with decoding my
.7z
sample. I get an"premature eof"
error when trying to decode a piece of data.The error is caused by checking
status
againstStatus::StreamEnd
while it is actually isStatus::Ok
.My case:
input.len()=326
,buf.len()=906
,read=906
,consumed=326
,eof=false
,status=Ok
input.len()=0
,buf.len()=32
,read=0
,consumed=0
,eof=true
,status=Ok
After the second read I get the error. I've added a check whether
status
is notStatus::Ok
when dealing with an empty input (eof=true
) before returning an error.