changeset 36476:8bfadf8b7d3a

XvMC: Add check for invalid data_size in the shmem case.
author iive
date Mon, 06 Jan 2014 20:43:17 +0000
parents 7a2dcbac77fb
children a44082ef4e12
files libvo/vo_xvmc.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xvmc.c	Mon Jan 06 20:11:56 2014 +0000
+++ b/libvo/vo_xvmc.c	Mon Jan 06 20:43:17 2014 +0000
@@ -199,6 +199,8 @@
                              NULL, xvimage_width, xvimage_height, &Shminfo);
         if (!xvimage)
             goto noshmimage;
+        if (!xvimage->data_size)
+            goto shmgetfail;
 
         Shminfo.shmid    = shmget(IPC_PRIVATE, xvimage->data_size, IPC_CREAT | 0777);
         if (Shminfo.shmid == -1)