[vlc-commits] [Git][videolan/vlc][master] subsdelay: handle NULL segment text

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Aug 3 05:26:11 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
2322d55d by Marvin Scholz at 2022-08-03T05:10:37+00:00
subsdelay: handle NULL segment text

In some rare cases psz_text can be NULL, which would end up being
passed to strlen, causing a crash.

Fix CD 524d077a-d613-4f2f-85b1-2a2af0747888

- - - - -


1 changed file:

- modules/spu/subsdelay.c


Changes:

=====================================
modules/spu/subsdelay.c
=====================================
@@ -1330,7 +1330,7 @@ static bool SubsdelayIsTextEmpty( const text_segment_t *p_segment )
 {
     while ( p_segment )
     {
-        if ( strlen( p_segment->psz_text ) > 0 )
+        if ( p_segment->psz_text && strlen( p_segment->psz_text ) > 0 )
         {
             size_t offset = strspn( p_segment->psz_text, " " );
             if ( p_segment->psz_text[offset] )



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2322d55db35f8e44cba771600dd764816d4d0f42
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list