[vlc-commits] [Git][videolan/vlc][3.0.x] subsdelay: handle NULL segment text

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Aug 4 12:13:03 UTC 2022



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
c8cd3f95 by Marvin Scholz at 2022-08-04T11:19:12+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

(cherry picked from commit 2322d55db35f8e44cba771600dd764816d4d0f42)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>

- - - - -


1 changed file:

- modules/spu/subsdelay.c


Changes:

=====================================
modules/spu/subsdelay.c
=====================================
@@ -1337,7 +1337,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/c8cd3f95e337856fd04efd8545708855d978ce0c

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