[vlc-commits] [Git][videolan/vlc][master] codec: cea708: do sid extra reading before sanity check
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Jul 31 08:23:52 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
3de342f2 by Steve Lhomme at 2026-07-31T08:10:17+00:00
codec: cea708: do sid extra reading before sanity check
The i_block_size check needs to take in account we eat an extra byte.
Fixes #29781
- - - - -
1 changed file:
- modules/codec/cea708.c
Changes:
=====================================
modules/codec/cea708.c
=====================================
@@ -81,17 +81,17 @@ static void CEA708_DTVCC_Demux_ServiceBlocks( cea708_demux_t *h, vlc_tick_t i_st
uint8_t i_sid = p_data[0] >> 5;
const uint8_t i_block_size = p_data[0] & 0x1F;
- if( i_block_size == 0 || i_block_size > i_data - 1 )
- {
- return;
- }
- else if( i_sid == 0x07 )
+ if( i_sid == 0x07 )
{
i_sid = p_data[1] & 0x3F;
if( i_sid < 0x07 )
return;
p_data += 1; i_data -= 1;
}
+ if( i_block_size == 0 || i_block_size > i_data - 1 )
+ {
+ return;
+ }
p_data += 1; i_data -= 1;
h->p_callback( h->priv, i_sid, i_start, p_data, i_block_size );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3de342f2375ac75a59bd5f2396f820b9d0f2a941
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3de342f2375ac75a59bd5f2396f820b9d0f2a941
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list