mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-07-03 11:42:47 -05:00
Fixed unmap_file() segmentation fault
This commit is contained in:

committed by
Michał Trojnara

parent
0db17be606
commit
8a9b275494
4
pe.c
4
pe.c
@ -112,12 +112,12 @@ static FILE_FORMAT_CTX *pe_ctx_new(GLOBAL_OPTIONS *options, BIO *hash, BIO *outd
|
||||
return NULL; /* FAILED */
|
||||
}
|
||||
if (memcmp(options->indata, "MZ", 2)) {
|
||||
unmap_file(options->infile, filesize);
|
||||
unmap_file(options->indata, filesize);
|
||||
return NULL; /* FAILED */
|
||||
}
|
||||
pe_ctx = pe_ctx_get(options->indata, filesize);
|
||||
if (!pe_ctx) {
|
||||
unmap_file(options->infile, filesize);
|
||||
unmap_file(options->indata, filesize);
|
||||
return NULL; /* FAILED */
|
||||
}
|
||||
ctx = OPENSSL_malloc(sizeof(FILE_FORMAT_CTX));
|
||||
|
Reference in New Issue
Block a user