23 lines
847 B
Diff
23 lines
847 B
Diff
|
--- gst/vmnc/vmncdec.c
|
||
|
+++ gst/vmnc/vmncdec.c
|
||
|
@@ -370,7 +370,7 @@ vmnc_handle_wmvi_rectangle (GstVMncDec *
|
||
|
|
||
|
if (dec->imagedata)
|
||
|
g_free (dec->imagedata);
|
||
|
- dec->imagedata = g_malloc (dec->format.width * dec->format.height *
|
||
|
+ dec->imagedata = g_malloc0 (dec->format.width * dec->format.height *
|
||
|
dec->format.bytes_per_pixel);
|
||
|
GST_DEBUG_OBJECT (dec, "Allocated image data at %p", dec->imagedata);
|
||
|
|
||
|
@@ -901,6 +901,10 @@ vmnc_handle_packet (GstVMncDec * dec, co
|
||
|
GST_WARNING_OBJECT (dec, "Rectangle out of range, type %d", r.type);
|
||
|
return ERROR_INVALID;
|
||
|
}
|
||
|
+ } else if (r.width > 16384 || r.height > 16384) {
|
||
|
+ GST_WARNING_OBJECT (dec, "Width or height too high: %ux%u", r.width,
|
||
|
+ r.height);
|
||
|
+ return ERROR_INVALID;
|
||
|
}
|
||
|
|
||
|
switch (r.type) {
|