Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scte/35.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,18 +547,18 @@ static inline bool scte35_insert_validate(const uint8_t *p_scte35)

if (i_length < SCTE35_INSERT_HEADER_SIZE + SCTE35_INSERT_HEADER2_SIZE +
SCTE35_SPLICE_TIME_HEADER_SIZE ||
i_length < SCTE35_INSERT_HEADER_SIZE + SCTE35_INSERT_HEADER2_SIZE +
i_length < (size_t)SCTE35_INSERT_HEADER_SIZE + SCTE35_INSERT_HEADER2_SIZE +
scte35_splice_time_size(
scte35_insert_get_splice_time(p_scte35)))
return false;

if (scte35_insert_has_duration(p_scte35))
return i_length >= SCTE35_INSERT_HEADER_SIZE +
return i_length >= (size_t)SCTE35_INSERT_HEADER_SIZE +
SCTE35_INSERT_HEADER2_SIZE +
scte35_splice_time_size(scte35_insert_get_splice_time(p_scte35))
+ SCTE35_BREAK_DURATION_HEADER_SIZE +
SCTE35_INSERT_FOOTER_SIZE;
return i_length >= SCTE35_INSERT_HEADER_SIZE +
return i_length >= (size_t)SCTE35_INSERT_HEADER_SIZE +
SCTE35_INSERT_HEADER2_SIZE +
scte35_splice_time_size(scte35_insert_get_splice_time(p_scte35))
+ SCTE35_INSERT_FOOTER_SIZE;
Expand All @@ -575,9 +575,9 @@ static inline bool scte35_insert_validate(const uint8_t *p_scte35)
return false;

if (scte35_insert_has_duration(p_scte35))
return i_length >= p_end + SCTE35_BREAK_DURATION_HEADER_SIZE +
SCTE35_INSERT_FOOTER_SIZE - p_command;
return i_length >= p_end + SCTE35_INSERT_FOOTER_SIZE - p_command;
return i_length >= (size_t)(p_end + SCTE35_BREAK_DURATION_HEADER_SIZE +
SCTE35_INSERT_FOOTER_SIZE - p_command);
return i_length >= (size_t)(p_end + SCTE35_INSERT_FOOTER_SIZE - p_command);
}

/*****************************************************************************
Expand Down