diff options
author | Adam Jackson <ajax@redhat.com> | 2015-01-05 16:48:11 -0500 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2015-02-01 09:23:23 +1000 |
commit | f7e3478fe7817457017f31eb51803c4d03c69249 (patch) | |
tree | 761e15cbbccd13e646f32d29cbf6575fa3fd3e67 | |
parent | 645ae07fac78dd2444fd744d3bf9b27e27d06e41 (diff) |
dix: make RegionInit legal C++
The CVE fix in:
commit 97015a07b9e15d8ec5608b95d95ec0eb51202acb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Jan 22 22:37:15 2014 -0800
dix: integer overflow in RegionSizeof() [CVE-2014-8092 3/4]
offended the C++ demons:
../../include/regionstr.h:147:45: error: invalid conversion from 'void*' to
'pixman_region16_data_t* {aka pixman_region16_data*}' [-fpermissive]
Normally this isn't a problem, because around here we have the sense and
common decency to not use C++, but this does make tigervnc fail to build,
which is a little rude of us.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit bb23fbf5bb278113c9c481875423b4d128180972)
-rw-r--r-- | include/regionstr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/regionstr.h b/include/regionstr.h index 33df87f0a..00343f27f 100644 --- a/include/regionstr.h +++ b/include/regionstr.h @@ -144,7 +144,7 @@ RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size) size_t rgnSize; (_pReg)->extents = RegionEmptyBox; if (((_size) > 1) && ((rgnSize = RegionSizeof(_size)) > 0) && - (((_pReg)->data = malloc(rgnSize)) != NULL)) { + (((_pReg)->data = (RegDataPtr) malloc(rgnSize)) != NULL)) { (_pReg)->data->size = (_size); (_pReg)->data->numRects = 0; } |