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
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to