[vlc-commits] picture: make sure we never try to allocate more planes than possible

Steve Lhomme git at videolan.org
Mon Nov 18 16:15:36 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Nov 14 15:52:05 2019 +0100| [27f89a75b96d1bcd6ceb52a34d22a12462c86ba3] | committer: Steve Lhomme

picture: make sure we never try to allocate more planes than possible

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27f89a75b96d1bcd6ceb52a34d22a12462c86ba3
---

 src/misc/picture.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/misc/picture.c b/src/misc/picture.c
index 56c88c8900..e822bb62a8 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -276,6 +276,7 @@ picture_t *picture_NewFromFormat(const video_format_t *restrict fmt)
     }
 
     /* Calculate how big the new image should be */
+    assert(pic->i_planes <= PICTURE_PLANE_MAX);
     size_t plane_sizes[PICTURE_PLANE_MAX];
     size_t pic_size = 0;
 



More information about the vlc-commits mailing list