Opened 16 years ago
Closed 16 years ago
#2654 closed defect (fixed)
[PATCH] Infinite loop in relation editor
Reported by: | Daeron | Owned by: | team |
---|---|---|---|
Priority: | trivial | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
There's a remote possibility for an infinite loop in the relation editor in the linkedness checking.
If the relation itself (or a relation containing it as first or last member) is added as the first member, or it is added multiple times in the relation, the code tries to infinitely traverse the sub-relations.
This patch fixes the bug by checking that the sub-relation is not the relation itself.
Attachments (2)
Change History (5)
by , 16 years ago
Attachment: | relationeditor-infiniteloop.diff added |
---|
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Yes, you are right. I didn't consider the possibility that the added relation might already contain a loop in itself.
Attached new patch adds also a depth check.
by , 16 years ago
Attachment: | relationeditor-infiniteloop2.diff added |
---|
Actually that does not fix the problem. You should either check against all sub-relations which have been before or add a depth break count (e.g. 10).