Commit c9d81fc3 authored by Mike DePaulo's avatar Mike DePaulo

Merge pull request #20 from sunweaver/pr/fix-CVE-2015-3418

dix: Allow zero-height PutImage requests (fix for X.Org's CVE-2015-3418).
parents 7ccbb073 dba779d9
......@@ -2071,7 +2071,7 @@ ProcPutImage(register ClientPtr client)
tmpImage = (char *)&stuff[1];
lengthProto = length;
if (lengthProto >= (INT32_MAX / stuff->height))
if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if (((((lengthProto * stuff->height) + (unsigned)3) >> 2) +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment