Ticket #6997 (closed defect: fixed)
Opened 3 years ago
Last modified 3 years ago
libmythdvdnav defects
| Reported by: | Erik Hovland <erik@…> | Owned by: | paulh |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.22 |
| Component: | MythTV - General | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
- Close a resource leak in an error path.
- Use parens to guarantee the correct operator precedence.
- Missing curly braces causes a lock to stay locked in an error path.
- An array is indexed incorrectly opening the possibility of indexing out of bounds.
Attachments
Change History
Changed 3 years ago by Erik Hovland <erik@…>
- Attachment libs_libmythdvdnav-resource-leak added
Changed 3 years ago by Erik Hovland <erik@…>
- Attachment libs_libmythdvdnav-precedence-fix added
Use parens to guarantee precedence
Changed 3 years ago by Erik Hovland <erik@…>
- Attachment libs_libmythdvdnav-missing-lock added
Use curly braces to unlock mutex in error path
Changed 3 years ago by Erik Hovland <erik@…>
- Attachment libs_libmythdvdnav-dont-overrun-arrays added
Index at i-1 to prevent overrun of the array.
comment:1 Changed 3 years ago by paulh
- Owner changed from ijr to paulh
- Status changed from new to assigned
- Milestone changed from unknown to 0.22
comment:5 Changed 3 years ago by paulh
Erik, have you verified No. 4 is correct? I can see there is something wrong since the fwda[] array has only 19 members but are you sure your fix is correct? Also shouldn't the same be done for the bwda[] array in the next else block?
comment:6 Changed 3 years ago by Erik Hovland <erik@…>
Sadly, the code base is too large and my brain is too feeble to be really sure that this one is correct. But let me see...This change is not yet tested by me. Sorry. Feel free to close the ticket and mention that the patch is rejected. I will get it tested and resubmit if it still works.
Note that the mplayerhq folk have removed this code entirely from their tree. So it is likely that it is never used.
Changed 3 years ago by skamithi
- Attachment changes_on_searching_c_dvdnav.diff added
fix typo in searching.c , after the major upgrade about 5 months ago, i made a type in the for loop statement.

Close leak in error path