mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-05 01:00:11 -05:00
Fix insufficient MSI_ENTRY comparison
This commit is contained in:
parent
5b8376ce32
commit
5d2bf2c80f
4
msi.c
4
msi.c
@ -1269,9 +1269,7 @@ static int msi_dirent_new(MSI_FILE *msi, MSI_ENTRY *entry, MSI_DIRENT *parent, M
|
||||
}
|
||||
/* detect cycles in previously visited entries (parents, siblings) */
|
||||
if (!ret) { /* initialized (non-root entry) */
|
||||
if ((entry->leftSiblingID != NOSTREAM && tortoise->entry->leftSiblingID == entry->leftSiblingID)
|
||||
|| (entry->rightSiblingID != NOSTREAM && tortoise->entry->rightSiblingID == entry->rightSiblingID)
|
||||
|| (entry->childID != NOSTREAM && tortoise->entry->childID == entry->childID)) {
|
||||
if (!memcmp(entry, tortoise->entry, sizeof(MSI_ENTRY))) {
|
||||
printf("MSI_ENTRY cycle detected at level %d\n", cnt);
|
||||
OPENSSL_free(entry);
|
||||
return 0; /* FAILED */
|
||||
|
Loading…
x
Reference in New Issue
Block a user