[vlc-commits] [Git][videolan/vlc][master] picture: fix potential use-after-free on error

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Nov 26 17:39:20 UTC 2022



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


Commits:
18339865 by Alexandre Janniaux at 2022-11-26T17:21:17+00:00
picture: fix potential use-after-free on error

picture_InternalClone can fail and return NULL, so the clone picture
must not be used in case of error.

Regression from e0b6a09a8d8d0a3c0011b9cc3097b4373f3cab30.

- - - - -


1 changed file:

- src/misc/picture.c


Changes:

=====================================
src/misc/picture.c
=====================================
@@ -465,6 +465,8 @@ picture_t *picture_InternalClone(picture_t *picture,
 picture_t *picture_Clone(picture_t *picture)
 {
     picture_t *clone = picture_InternalClone(picture, picture_DestroyClone, picture);
+    if (clone == NULL)
+        return NULL;
 
     const picture_priv_t *priv = container_of(picture, picture_priv_t, picture);
     picture_priv_t *clone_priv = container_of(clone, picture_priv_t, picture);



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

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