Opened 19 years ago
Closed 19 years ago
#1708 closed defect (fixed)
Invalid write in dvbsubdec.c
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.20 |
Component: | dvb | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
I was playing a recording I made a while ago and found that it was repeatably crashing the frontend. The recording was somewhat noisy and reported various ac-tex damaged and mb incr damaged errors but I wouldn't have expected it to crash. Under gdb it looked that it might be a double-free problem so I ran the frontend under valgrind and it reported invalid writes in dvbsub_parse_pixel_data_block. I'm attaching the valgrind log. This is SVN 9744. David.
Attachments (3)
Change History (7)
Changed 19 years ago by
Attachment: | mythgrind.10773 added |
---|
comment:1 Changed 19 years ago by
Changed 19 years ago by
Attachment: | mythfrontend.log added |
---|
comment:2 Changed 19 years ago by
Milestone: | → 0.20 |
---|---|
Version: | → head |
David, can you debug this? Having the broken file is a prerequisite for debugging this.
First look to see if it is possible to CRC check the segments in the dvbsub_decode loop. If not, just make those functions watertight. Unfortunately, it doesn't look like there are any fixes in ffmpeg cvs.
comment:3 Changed 19 years ago by
I couldn't see any way to use CRC checking there but I did discover an error in the bounds checking in dvbsubdec.c that meant that an invalid value wasn't being rejected properly. The patch (one line) is attached. With this patch applied the file plays without crashing or upsetting valgrind. With subtitles enabled it looks like one sentence of the subtitling is lost but otherwise it's fine.
David
Changed 19 years ago by
Attachment: | dvbsubdecpatch.txt added |
---|
I just noticed the following in the log: [dvbsub @ 0x4e0b18c]Junk in packet DVBSub error: line overflow DVBSub error: line overflow [dvbsub @ 0x4e0b18c]Invalid object location! [dvbsub @ 0x4e0b18c]Invalid object location!
I guess it's not recovering correctly from the error. The full log is attached. David.