mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-09 18:48:05 -05:00
Reset calculated message digest, CID 1519395
This commit is contained in:
parent
4da5526c05
commit
c29e14e697
1
msi.c
1
msi.c
@ -745,7 +745,6 @@ int msi_calc_digest(char *indata, int mdtype, u_char *mdbuf, uint32_t fileend)
|
||||
printf("Unable to set up the digest context\n");
|
||||
goto out;
|
||||
}
|
||||
memset(mdbuf, 0, EVP_MAX_MD_SIZE);
|
||||
(void)BIO_seek(bio, 0);
|
||||
|
||||
n = 0;
|
||||
|
@ -3385,7 +3385,6 @@ static int pe_calc_digest(char *indata, int mdtype, u_char *mdbuf, FILE_HEADER *
|
||||
printf("Unable to set up the digest context\n");
|
||||
goto err;
|
||||
}
|
||||
memset(mdbuf, 0, EVP_MAX_MD_SIZE);
|
||||
bio = BIO_new(BIO_s_mem());
|
||||
i = n = header->header_size + 88 + 4 + 60 + header->pe32plus * 16 + 8;
|
||||
if (!BIO_write_ex(bio, indata, i, &written) || written != i)
|
||||
@ -3852,7 +3851,6 @@ static int cab_calc_digest(char *indata, int mdtype, u_char *mdbuf, FILE_HEADER
|
||||
printf("Unable to set up the digest context\n");
|
||||
goto err;
|
||||
}
|
||||
memset(mdbuf, 0, EVP_MAX_MD_SIZE);
|
||||
left = offset;
|
||||
if (left > SIZE_64K)
|
||||
left = SIZE_64K;
|
||||
@ -4438,6 +4436,8 @@ static int cat_verify_member(CatalogAuthAttr *attribute, char *indata, FILE_HEAD
|
||||
printf("Failed to extract current message digest\n\n");
|
||||
goto out;
|
||||
}
|
||||
/* reset calculated message digest */
|
||||
memset(cmdbuf, 0, EVP_MAX_MD_SIZE);
|
||||
/* compute a message digest of the input file */
|
||||
switch (filetype) {
|
||||
case FILE_TYPE_CAB:
|
||||
|
Loading…
x
Reference in New Issue
Block a user