bb11946 - check that tar checksum is within bounds. Patch supplied by Suleman Ali.

remotes/push_mirror/html-mail-utf8-fix
Steven Morgan 8 years ago
parent 77326673e2
commit 292d6878fa
  1. 3
      libclamav/untar.c

@ -182,6 +182,9 @@ cli_untar(const char *dir, unsigned int posix, cli_ctx *ctx)
if((ret=cli_checklimits("cli_untar", ctx, 0, 0, 0))!=CL_CLEAN)
return ret;
if (nread < TARCHECKSUMOFFSET + TARCHECKSUMLEN)
return ret;
checksum = getchecksum(block);
cli_dbgmsg("cli_untar: Candidate checksum = %d, [%o in octal]\n", checksum, checksum);
if(testchecksum(block, checksum) != 0) {

Loading…
Cancel
Save