[Tracker] PATCH: Fix segfault when peeking on an empty TrackerPriorityQueue



Hi list,

I noticed tracker_priority_queue_peek will try indexing outside the
segments array's bounds when the priority queue is empty.

Here's a patch which adds a bounds check:
https://github.com/Pelagicore/tracker-ivi/commit/2a98cb923f99e85dcda10106bf6c338fe11bb8bc

Here's a patch testing the new check, and also showing the issue with
the old code:
https://github.com/Pelagicore/tracker-ivi/commit/3c2f32b0067ffca3ed1fe94ff118cecdb5d8bd58

-- 
Regards,
Jonatan Pålsson

Pelagicore AB
Ekelundsgatan 4, 6th floor, SE-411 18 Gothenburg, Sweden


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]