From 0a225729c70fb761f07c3cac08b8cc00a74de4c5 Mon Sep 17 00:00:00 2001 From: speidy Date: Mon, 10 Mar 2014 02:52:08 +0200 Subject: [PATCH] libxrdp: fastpath input, validate eventFlags --- libxrdp/xrdp_fastpath.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libxrdp/xrdp_fastpath.c b/libxrdp/xrdp_fastpath.c index 27877ef1..9ba171f0 100644 --- a/libxrdp/xrdp_fastpath.c +++ b/libxrdp/xrdp_fastpath.c @@ -169,6 +169,11 @@ xrdp_fastpath_process_EVENT_MOUSE(struct xrdp_fastpath *self, int eventFlags, int xPos; int yPos; + /* eventFlags MUST be zeroed out */ + if (eventFlags != 0) { + return 1; + } + if (!s_check_rem(s, 2 + 2 + 2)) { return 1; @@ -201,6 +206,11 @@ xrdp_fastpath_process_EVENT_MOUSEX(struct xrdp_fastpath *self, int xPos; int yPos; + /* eventFlags MUST be zeroed out */ + if (eventFlags != 0) { + return 1; + } + if (!s_check_rem(s, 2 + 2 + 2)) { return 1;