Commit 8cacc96b authored by Timo Teräs's avatar Timo Teräs
Browse files

tar: don't call digest finalization twice

otherwise bad things happens. avoid this be checking end of
stream at the beginning of read.
parent 0d9810ea
......@@ -90,6 +90,9 @@ static ssize_t tar_entry_read(void *stream, void *ptr, size_t size)
if (size > teis->bytes_left)
size = teis->bytes_left;
if (size == 0)
return 0;
r = teis->tar_is->read(teis->tar_is, ptr, size);
if (r < 0)
return r;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment