dee

Merge lp://qastaging/~mhr3/dee/fix-963991 into lp://qastaging/dee

Proposed by Michal Hruby
Status: Merged
Approved by: Michal Hruby
Approved revision: 363
Merged at revision: 361
Proposed branch: lp://qastaging/~mhr3/dee/fix-963991
Merge into: lp://qastaging/dee
Diff against target: 75 lines (+48/-1)
2 files modified
src/dee-tree-index.c (+1/-1)
tests/test-index.c (+47/-0)
To merge this branch: bzr merge lp://qastaging/~mhr3/dee/fix-963991
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Review via email: mp+100380@code.qastaging.launchpad.net

Commit message

Prevent a possible crash when prefix searching near the end of sequence

Description of the change

Prefix searching near the end of the index sequence could cause a crash because we were calling g_sequence_get on the end iterator followed by dereferencing of a (possibly) NULL pointer.

Added a check whether the found iterator isn't end iterator.

Also added unit test for the issue.

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

seems good

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Well, spotted. Rock on dude.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: