1
mirror of https://github.com/hashcat/hashcat synced 2025-03-22 21:14:22 +01: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

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