Modify

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)

relationeditor-infiniteloop.diff (1.1 KB ) - added by Daeron 16 years ago.
relationeditor-infiniteloop2.diff (1.8 KB ) - added by Daeron 16 years ago.

Download all attachments as: .zip

Change History (5)

by Daeron, 16 years ago

comment:1 by anonymous, 16 years ago

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).

comment:2 by Daeron, 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 Daeron, 16 years ago

comment:3 by stoecker, 16 years ago

Resolution: fixed
Status: newclosed

In r1624.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.