Opened 16 years ago
Closed 16 years ago
#4843 closed defect (fixed)
stime has only 19 values in it
Reported by: | Owned by: | skamithi | |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | mythtv | Version: | 0.21-fixes |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
In the function dvdnav_time_search_within_cell the array stime is looped through with the for loop. The end test is i<=19, but stime has only 19 entries. Which means we will overrun stime if i = 19.
Attachments (4)
Change History (12)
Changed 16 years ago by
Attachment: | libs_libmythdvdnav_searching.c-bad-test-for-for-loop.patch added |
---|
comment:1 Changed 16 years ago by
Milestone: | 0.21 → 0.22 |
---|
comment:2 Changed 16 years ago by
I agree there are two overruns there, but should the first loop be accessing stime[i-1] (for 0..18) and the second doing stime[19-i] (for 18..0) ?
Changed 16 years ago by
Attachment: | libs_libmythdvdnav_searching.c-bad-test-for-for-loop.2.patch added |
---|
does the stime assignment right
comment:3 Changed 16 years ago by
I agree. Sorry for the flub. The new patch should do what the anonymous poster suggested instead.
Changed 16 years ago by
Attachment: | libs_libmythdvdnav_searching.c-bad-test-for-for-loop.3.patch added |
---|
Another array needed to be index as i-1
Changed 16 years ago by
Attachment: | libs_libmythdvdnav_searching.c-bad-test-for-for-loop.4.patch added |
---|
this patch should be considered the latest attempt at the anonymous poster's suggestion
comment:5 Changed 16 years ago by
Owner: | changed from Isaac Richards to skamithi |
---|---|
Status: | new → assigned |
comment:6 Changed 16 years ago by
comment:8 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
changes the for loop end test to i < 19 so we don't overrun stime