diff options
Diffstat (limited to 'src/gunzip.c')
-rw-r--r-- | src/gunzip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gunzip.c b/src/gunzip.c index dd8d248..aebaf76 100644 --- a/src/gunzip.c +++ b/src/gunzip.c @@ -61,8 +61,8 @@ static ssize_t gzi_read(void *stream, void *ptr, size_t size) gis->cbprev = blob.ptr; gis->zs.avail_in = blob.len; gis->zs.next_in = (void *) gis->cbprev; - if (gis->zs.avail_in < 0) { - gis->err = -EIO; + if (blob.len < 0) { + gis->err = blob.len; goto ret; } else if (gis->zs.avail_in == 0) { gis->err = 1; |