mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-09 10:38:05 -05:00
Fix resource leak, CID 1535262
This commit is contained in:
parent
4db6ed0cad
commit
93f5f800d6
@ -3497,9 +3497,9 @@ static int pe_calc_digest(char *indata, int mdtype, u_char *mdbuf, FILE_HEADER *
|
|||||||
}
|
}
|
||||||
if (!header->sigpos) {
|
if (!header->sigpos) {
|
||||||
/* pad (with 0's) unsigned PE file to 8 byte boundary */
|
/* pad (with 0's) unsigned PE file to 8 byte boundary */
|
||||||
char *buf = OPENSSL_malloc(8);
|
|
||||||
int len = 8 - header->fileend % 8;
|
int len = 8 - header->fileend % 8;
|
||||||
if (len > 0 && len != 8) {
|
if (len > 0 && len != 8) {
|
||||||
|
char *buf = OPENSSL_malloc(8);
|
||||||
memset(buf, 0, (size_t)len);
|
memset(buf, 0, (size_t)len);
|
||||||
BIO_write(bhash, buf, len);
|
BIO_write(bhash, buf, len);
|
||||||
OPENSSL_free(buf);
|
OPENSSL_free(buf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user