Opened 16 years ago
Closed 15 years ago
#4938 closed defect (fixed)
second check of length is superflous
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | trivial | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
In MHIContext::SetNetBootInfo?() the length given is checked and if it is not the right size the function returns. The call goes on to check length again. It is likely that the first check was added later. But since it is there the second check doesn't make any sense. So it should be removed.
Attachments (2)
Change History (7)
Changed 16 years ago by
Attachment: | libs_libmythtv_mhi.cpp-length-test-is-superflous.patch added |
---|
comment:1 Changed 16 years ago by
I've referred this to David Matthews, to me it looks like the first check was added as a temporary hack, and then forgotten about.
comment:2 Changed 16 years ago by
Status: | new → infoneeded_new |
---|
if someone could look up the spec, or otherwise verify which check is the correct one we can resolve this issue...
comment:3 Changed 15 years ago by
I've just looked back at this and found my comments on #2311 and changeset 11598. There's also an open ticket #5543 that is related.
It looks as though I should have removed the references to NBI_VERSION_ABSENT in my patch to #2311. The UK MHEG profile says that the network boot info descriptor should always have at least two bytes of data so the first test is there to avoid problems if an invalid descriptor is seen.
This is all related to ensuring that an "off air" MHEG message is correctly removed when a channel comes on air. It's also complicated, though, because we want to ensure that the MHEG engine does not reboot as a result of tuning to another channel under control of MHEG itself.
I've made these changes in my own version and also set up recordings when BBC3 and UK History come on air to see exactly what happens. I'll try and submit a patch with these changes if it seems to work out.
David
comment:4 Changed 15 years ago by
I've tested this patch which is essentially the same as the original except that it also removes NBI_VERSION_ABSENT.
David
remove second length check