summaryrefslogtreecommitdiff
path: root/gst/vmnc/vmncdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/vmnc/vmncdec.c')
-rw-r--r--gst/vmnc/vmncdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/vmnc/vmncdec.c b/gst/vmnc/vmncdec.c
index b3c977883..cbbaeb6b4 100644
--- a/gst/vmnc/vmncdec.c
+++ b/gst/vmnc/vmncdec.c
@@ -785,7 +785,8 @@ vmnc_handle_packet (GstVMncDec * dec, const guint8 * data, int len,
r.type);
return ERROR_INVALID;
}
- if (r.x + r.width > dec->format.width ||
+ if (r.x > dec->format.width || r.y > dec->format.height ||
+ r.x + r.width > dec->format.width ||
r.y + r.height > dec->format.height) {
GST_WARNING_OBJECT (dec, "Rectangle out of range, type %d", r.type);
return ERROR_INVALID;