fuzz - 12156 - Explicit cast to unsigned 32bit int because a signed int could not hold 0xffff << 16 bits.

pull/111/head
Micah Snyder 6 years ago
parent 20dfea9d98
commit 8a4669be47
  1. 2
      libclamav/cpio.c

@ -145,7 +145,7 @@ int cli_scancpio_old(cli_ctx *ctx)
} else if (hdr_namesize % 2)
pos++;
}
filesize = (uint32_t)(EC16(hdr_old.filesize[0], conv) << 16 | EC16(hdr_old.filesize[1], conv));
filesize = (uint32_t)((uint32_t)EC16(hdr_old.filesize[0], conv) << 16 | EC16(hdr_old.filesize[1], conv));
cli_dbgmsg("CPIO: Filesize: %u\n", filesize);
if (!filesize)
continue;

Loading…
Cancel
Save