1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-30 03:48:17 +00:00

Report the uncompressed size only if it's known

This commit is contained in:
Jukka Ojanen 2021-08-30 16:28:54 +03:00
parent 8324d3cd07
commit 106fe88e4e

View File

@ -619,10 +619,13 @@ int hc_fstat (HCFILE *fp, struct stat *buf)
} }
else if (fp->xfp) else if (fp->xfp)
{ {
/* uncompressed bytes */ /* check that the uncompressed size is known */
const xzfile_t *xfp = fp->xfp; const xzfile_t *xfp = fp->xfp;
if (xfp->outSize != (UInt64)((Int64)-1))
{
buf->st_size = (off_t) xfp->outSize; buf->st_size = (off_t) xfp->outSize;
} }
}
return r; return r;
} }