Fix: TNEF dump hanging

pull/1445/head
Yoann Lecuyer 4 months ago
parent 86a3835218
commit 0b2ea8439d
No known key found for this signature in database
GPG Key ID: 3D03DAD9E5595FAB
  1. 2
      libclamav/tnef.c

@ -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);
}

Loading…
Cancel
Save