[vlc-commits] [Git][videolan/vlc][master] demux: mp4: fix MP4_COPY_BYTES()

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Jun 20 16:23:52 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
7bd9665b by Steve Lhomme at 2026-06-20T17:47:27+02:00
demux: mp4: fix MP4_COPY_BYTES()

dst is a pointer variable. We should not use the address of the variable but the
address in the variable.

And we should not reset the variable in case we don't have enough data to read.

Fixes #29939

Reported-by: Kai Martin (KG3N Dynamics, kg3n.com)

- - - - -


1 changed file:

- modules/demux/mp4/libmp4.c


Changes:

=====================================
modules/demux/mp4/libmp4.c
=====================================
@@ -94,13 +94,12 @@ static char * MP4_Time2Str( stime_t i_duration, uint32_t i_scale )
     { \
         if( (i_read) >= (size) ) \
         { \
-            memcpy( &dst, p_peek, size ); \
+            memcpy( dst, p_peek, size ); \
             p_peek += (size); \
             i_read -= (size); \
         } \
         else \
         { \
-            dst = 0; \
             i_read = 0; \
         } \
     } while(0)



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

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