mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-04 17:00:11 -05:00
Check a value range, CID 1519382
This commit is contained in:
parent
695892b8bf
commit
d9979c4bc6
@ -1596,6 +1596,9 @@ static u_char *pe_calc_page_hash(char *indata, uint32_t header_size,
|
|||||||
for (i=0; i<nsections; i++) {
|
for (i=0; i<nsections; i++) {
|
||||||
rs = GET_UINT32_LE(sections + 16);
|
rs = GET_UINT32_LE(sections + 16);
|
||||||
ro = GET_UINT32_LE(sections + 20);
|
ro = GET_UINT32_LE(sections + 20);
|
||||||
|
if (rs == 0 || rs >= UINT32_MAX) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for (l=0; l < rs; l+=pagesize, pi++) {
|
for (l=0; l < rs; l+=pagesize, pi++) {
|
||||||
PUT_UINT32_LE(ro + l, res + pi*pphlen);
|
PUT_UINT32_LE(ro + l, res + pi*pphlen);
|
||||||
if (!EVP_DigestInit(mdctx, md)) {
|
if (!EVP_DigestInit(mdctx, md)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user