Commit 99481459 authored by Nikita Egorov's avatar Nikita Egorov Committed by Christophe Massiot
Browse files

Append size check in scte35_validate.

In function scte35_validate psi_check_crc call execute without data
size check. The syntax flag in scte35 PSI by definition is false so
psi_validate will be true. In such case scte35_validate may overflow on
zero length PSI size.
parent 49307255
......@@ -670,7 +670,8 @@ static inline bool scte35_private_validate(const uint8_t *p_scte35)
static inline bool scte35_validate(const uint8_t *p_scte35)
if (psi_get_syntax(p_scte35) ||
psi_get_tableid(p_scte35) != SCTE35_TABLE_ID)
psi_get_tableid(p_scte35) != SCTE35_TABLE_ID ||
psi_get_length(p_scte35) < SCTE35_HEADER2_SIZE + PSI_CRC_SIZE)
return false;
if (!psi_check_crc(p_scte35))
Supports Markdown
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