Merge pull request #1445 from ylecuyer/patch-1

Fix: TNEF dump hanging
This commit is contained in:
Val S. 2025-02-03 13:52:37 -05:00 committed by GitHub
commit f60e2db3ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -171,7 +171,7 @@ int cli_tnef(const char *dir, cli_ctx *ctx)
cli_warnmsg("Saving dump to %s: refer to https://docs.clamav.net/manual/Installing.html\n", filename);
pos = 0;
while ((count = fmap_readn(ctx->fmap, buffer, pos, sizeof(buffer))) != (size_t)-1) {
while ((count = fmap_readn(ctx->fmap, buffer, pos, sizeof(buffer))) != (size_t)-1 && count != 0) {
pos += count;
cli_writen(fout, buffer, count);
}