[vlc-commits] [Git][videolan/vlc][master] spudec: fix buffer overflow reading

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jul 23 09:43:53 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
dfab94b3 by Steve Lhomme at 2026-07-23T09:15:02+00:00
spudec: fix buffer overflow reading

We use a bogus command value to fallback in the "default:" case and exit the loop.

Fixes #29728

- - - - -


1 changed file:

- modules/codec/spudec/parse.c


Changes:

=====================================
modules/codec/spudec/parse.c
=====================================
@@ -425,7 +425,7 @@ static int ParseControlSeq( decoder_t *p_dec, vlc_tick_t i_pts,
             i_index += 4;
         }
 
-        i_command = p_sys->buffer[i_index];
+        i_command = i_index < p_sys->buffer_size ? p_sys->buffer[i_index] : (SPU_CMD_END - 1);
 
         switch( i_command )
         {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dfab94b3aefff970598329ab8e3f7a6a08835dd1

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dfab94b3aefff970598329ab8e3f7a6a08835dd1
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