[Bug 750567] FTBFS because of access beyond end of array
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Jun 8 09:11:51 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=750567
--- Comment #3 from Chris <chris2553 at googlemail.com> ---
I don't think it does change behaviour, at least not in a meaningful way. The
logic of the present code implies that each value in the array has a value
greater than its predecessor. The current code assumes that the value of offset
is sane. The code after my patch is applied makes the same assumption. My code
is simpler. If offset is less than self->partition_offset[1], then 0 must be
the value to return, otherwise, if offset is less than
self->partition_offset[2], then 1 must be the value to return and so on.
Consequently, the >= test seems unnecessary. The only behaviour change that I
can see is what will be returned if offset is not a sane value. Perhaps I'm
misinterpreting the current code. I haven't looked at the code that loads the
values into the array.
My gcc is the latest snapshot 4.9.3 20150603 (prerelease).
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list