Opened 12 years ago

Closed 11 years ago

#4843 closed defect (fixed)

stime has only 19 values in it

Reported by: Erik Hovland <erik@…> 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)

libs_libmythdvdnav_searching.c-bad-test-for-for-loop.patch (1023 bytes) - added by Erik Hovland <erik@…> 12 years ago.
changes the for loop end test to i < 19 so we don't overrun stime
libs_libmythdvdnav_searching.c-bad-test-for-for-loop.2.patch (1.2 KB) - added by Erik Hovland <erik@…> 12 years ago.
does the stime assignment right
libs_libmythdvdnav_searching.c-bad-test-for-for-loop.3.patch (1.2 KB) - added by Erik Hovland <erik@…> 12 years ago.
Another array needed to be index as i-1
libs_libmythdvdnav_searching.c-bad-test-for-for-loop.4.patch (1.4 KB) - added by Erik Hovland <erik@…> 12 years ago.
this patch should be considered the latest attempt at the anonymous poster's suggestion

Download all attachments as: .zip

Change History (12)

Changed 12 years ago by Erik Hovland <erik@…>

changes the for loop end test to i < 19 so we don't overrun stime

comment:1 Changed 12 years ago by Isaac Richards

Milestone: 0.210.22

comment:2 Changed 12 years ago by anonymous

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 12 years ago by Erik Hovland <erik@…>

does the stime assignment right

comment:3 Changed 12 years ago by Erik Hovland <erik@…>

I agree. Sorry for the flub. The new patch should do what the anonymous poster suggested instead.

Changed 12 years ago by Erik Hovland <erik@…>

Another array needed to be index as i-1

comment:4 Changed 12 years ago by Erik Hovland <erik@…>

The latest patch should be defect free. Sorry for the churning.

Changed 12 years ago by Erik Hovland <erik@…>

this patch should be considered the latest attempt at the anonymous poster's suggestion

comment:5 Changed 11 years ago by danielk

Owner: changed from Isaac Richards to skamithi
Status: newassigned

comment:6 Changed 11 years ago by skamithi

(In [17554]) Refs #4843. internal dvd player. fix incorrect loop values in dvdnav function. will commit to 0.21 fixes.

comment:7 Changed 11 years ago by skamithi

(In [17629]) Refs #4843. comit [17554] to 0.21 fixes

comment:8 Changed 11 years ago by skamithi

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.