summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-12-09 09:30:59 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-12-09 11:28:07 -0800
commit9802a0162f738de03585ca3f3b8a8266494f7d45 (patch)
tree1c35163d33e97b946ebce73644b5b3eac62b1066
parent61b17c0f10307e25e51e30e6fb1d3e3127f82d86 (diff)
Missing parens in REQUEST_FIXED_SIZE macro [CVE-2014-8092 pt. 5]
The 'n' parameter must be surrounded by parens in both places to prevent precedence from mis-computing things. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--include/dix.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/dix.h b/include/dix.h
index 21176a8c3..921156b4c 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -80,7 +80,7 @@ SOFTWARE.
#define REQUEST_FIXED_SIZE(req, n)\
if (((sizeof(req) >> 2) > client->req_len) || \
- ((n >> 2) >= client->req_len) || \
+ (((n) >> 2) >= client->req_len) || \
((((uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len)) \
return(BadLength)