tar: don't call digest finalization twice
otherwise bad things happens. avoid this be checking end of stream at the beginning of read.cute-signatures
parent
0d9810ea6a
commit
8cacc96bf0
|
@ -90,6 +90,9 @@ static ssize_t tar_entry_read(void *stream, void *ptr, size_t size)
|
||||||
|
|
||||||
if (size > teis->bytes_left)
|
if (size > teis->bytes_left)
|
||||||
size = teis->bytes_left;
|
size = teis->bytes_left;
|
||||||
|
if (size == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
r = teis->tar_is->read(teis->tar_is, ptr, size);
|
r = teis->tar_is->read(teis->tar_is, ptr, size);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Reference in New Issue