Fix (unreported) potential infinite loop over collections' parents pointers.
It is crucial to properly tag as loopback that kind of pointers, otherwise some users of libquery's foreach_ID might end up in infinite loops.
This commit is contained in:
@@ -783,7 +783,7 @@ static void library_foreach_ID_link(
|
||||
CALLBACK_INVOKE(child->collection, IDWALK_CB_NEVER_SELF | IDWALK_CB_USER);
|
||||
}
|
||||
for (CollectionParent *parent = collection->parents.first; parent; parent = parent->next) {
|
||||
CALLBACK_INVOKE(parent->collection, IDWALK_CB_NEVER_SELF);
|
||||
CALLBACK_INVOKE(parent->collection, IDWALK_CB_NEVER_SELF | IDWALK_CB_LOOPBACK);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user