Initialize more members in zip_source_zip, so zip_source_stat works before zip_source_open (needed by zip_close).
diff --git a/lib/zip_source_crc.c b/lib/zip_source_crc.c index f127796..99bc965 100644 --- a/lib/zip_source_crc.c +++ b/lib/zip_source_crc.c
@@ -66,8 +66,12 @@ return NULL; } + ctx->eof = 0; ctx->validate = validate; - + ctx->e[0] = ctx->e[1] = 0; + ctx->size = 0; + ctx->crc = 0; + return zip_source_layered(za, src, crc_read, ctx); }