Opened 20 years ago
Closed 20 years ago
Last modified 20 years ago
#1482 closed defect (fixed)
add some validation for sections readed by dvbsiparser
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.20 |
Component: | dvb | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
attached patch is untested I'll report after a few hours of sleep
Attachments (3)
Change History (8)
by , 20 years ago
Attachment: | sectionreader_validation.patch added |
---|
comment:1 by , 20 years ago
by , 20 years ago
Attachment: | 20060310_athenas.gdb.txt added |
---|
comment:2 by , 20 years ago
Milestone: | → 0.20 |
---|---|
Version: | → head |
In the case where we get 0 - 7 bytes, we should be doing further reads into the buffer starting at the end of the previous read. So something like
if (rsz >0 && rsz < MIN_SIZE) partial packet. if (partial packet) read (fd, &buffer[old_rsz+1], MAX_SIZE - old_rsz)
I also think we should be doing that if the whole packet is incomplete. So when we get enough data for the header we can check the header length to find out the packet size and not attempt to parse it till we have sufficient data for a complete packet.
by , 20 years ago
Attachment: | sectionreader_validation2.patch added |
---|
comment:3 by , 20 years ago
Updated patch, calls only ParseTable() if the section_length matches the buffer length.
comment:4 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
one segfault, seems to be unrelated. backtrace attached