[vlc-commits] [Git][videolan/vlc][3.0.x] demux: nsv: don't dereference pointer if it's past the buffer

Thomas Guillem (@tguillem) gitlab at videolan.org
Mon Sep 15 08:30:36 UTC 2025



Thomas Guillem pushed to branch 3.0.x at VideoLAN / VLC


Commits:
e9844999 by Steve Lhomme at 2025-09-15T10:30:09+02:00
demux: nsv: don't dereference pointer if it's past the buffer

Fixes #29300

- - - - -


1 changed file:

- modules/demux/nsv.c


Changes:

=====================================
modules/demux/nsv.c
=====================================
@@ -249,7 +249,7 @@ static int Demux( demux_t *p_demux )
                     {
                         p++;
                     }
-                    if( *p == 0 && p + 1 < &p_frame->p_buffer[p_frame->i_buffer] )
+                    if( p + 1 < &p_frame->p_buffer[p_frame->i_buffer] && *p == 0 )
                     {
                         p_frame->i_buffer -= p + 1 - p_frame->p_buffer;
                         p_frame->p_buffer = p + 1;
@@ -620,4 +620,3 @@ static int ReadNSVs( demux_t *p_demux )
 
     return VLC_SUCCESS;
 }
-



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

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