Commit fe838cef authored by Steven Toth's avatar Steven Toth Committed by Jean-Paul Saman

SCTE35 / CUEI Descriptor parsing bug. Descriptor lengths of one byte fail to...

SCTE35 / CUEI Descriptor parsing bug. Descriptor lengths of one byte fail to parse, instead returning null.

The Spec from 2004 to 2016 shows the descriptor payload has never been
more than a single byte.
See SCTE 35 2016 Page 19 Table 2 (Section 8.2).

Correct the length validation check, and reject any descriptor that
IS NOT one byte long, as per the spec.
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
(cherry picked from commit 37f981c3)
parent 8feee970
...@@ -53,7 +53,7 @@ dvbpsi_cuei_dr_t * dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor) ...@@ -53,7 +53,7 @@ dvbpsi_cuei_dr_t * dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor)
if (dvbpsi_IsDescriptorDecoded(p_descriptor)) if (dvbpsi_IsDescriptorDecoded(p_descriptor))
return p_descriptor->p_decoded; return p_descriptor->p_decoded;
if (p_descriptor->i_length == 0x01) if (p_descriptor->i_length != 0x01)
return NULL; return NULL;
/* Allocate memory */ /* Allocate memory */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment