[vlc-commits] [Git][videolan/vlc][3.0.x] codec: cea708: do sid extra reading before sanity check
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Aug 1 09:53:26 UTC 2026
Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC
Commits:
b4315546 by Steve Lhomme at 2026-08-01T10:38:30+02: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
(cherry picked from commit 3de342f2375ac75a59bd5f2396f820b9d0f2a941)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
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/b4315546b86f0b8acc4dc209c1fae57c20ee627f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b4315546b86f0b8acc4dc209c1fae57c20ee627f
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