Crash if accessing negative reference indices

Bug #882356 reported by Robert Xiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Meliae
Fix Released
Undecided
Robert Xiao

Bug Description

A segfault occurs if attempting to access a negative ref index.

Sample code:

>>> om = loader.load(...)
>>> obj = om.get_all('dict')[0]
>>> print obj[-1]

Expected: last reference of obj
Observed: crash

Attached: patch

Related branches

Revision history for this message
Robert Xiao (robert-bo-xiao) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

Thanks for the patch.
I added some tests and tweaked the code a little bit, but it looks good.

Changed in meliae:
assignee: nobody → Robert Xiao (robert-bo-xiao)
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.