mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-04 17:00:11 -05:00
verify corrupted SpcPeImageData struct
This commit is contained in:
parent
5db237f242
commit
f248286d6f
@ -3278,8 +3278,13 @@ static int pe_extract_page_hash(SpcAttributeTypeAndOptionalValue *obj,
|
||||
return 0; /* FAILED */
|
||||
blob = obj->value->value.sequence->data;
|
||||
id = d2i_SpcPeImageData(NULL, &blob, obj->value->value.sequence->length);
|
||||
if (id == NULL)
|
||||
if (!id) {
|
||||
return 0; /* FAILED */
|
||||
}
|
||||
if (!id->file) {
|
||||
SpcPeImageData_free(id);
|
||||
return 0; /* FAILED */
|
||||
}
|
||||
if (id->file->type != 1) {
|
||||
SpcPeImageData_free(id);
|
||||
return 1; /* OK - this is not SpcSerializedObject structure that contains page hashes */
|
||||
|
Loading…
x
Reference in New Issue
Block a user