Skip to content

Commit 5d2bf2c

Browse files
committed
Fix insufficient MSI_ENTRY comparison
1 parent 5b8376c commit 5d2bf2c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

msi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,9 +1269,7 @@ static int msi_dirent_new(MSI_FILE *msi, MSI_ENTRY *entry, MSI_DIRENT *parent, M
12691269
}
12701270
/* detect cycles in previously visited entries (parents, siblings) */
12711271
if (!ret) { /* initialized (non-root entry) */
1272-
if ((entry->leftSiblingID != NOSTREAM && tortoise->entry->leftSiblingID == entry->leftSiblingID)
1273-
|| (entry->rightSiblingID != NOSTREAM && tortoise->entry->rightSiblingID == entry->rightSiblingID)
1274-
|| (entry->childID != NOSTREAM && tortoise->entry->childID == entry->childID)) {
1272+
if (!memcmp(entry, tortoise->entry, sizeof(MSI_ENTRY))) {
12751273
printf("MSI_ENTRY cycle detected at level %d\n", cnt);
12761274
OPENSSL_free(entry);
12771275
return 0; /* FAILED */

0 commit comments

Comments
 (0)