summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-05-14 10:40:14 +0200
committerDavid Tardon <dtardon@redhat.com>2011-05-16 17:35:02 +0200
commitbe2ec9d36b8d34e69d228199ba05c7a01483da33 (patch)
treed8681e306908c6c060e76ba556efd5c74e389a28
parent4d969ef8bf0f565e9b2ab860e8f6bea182abf188 (diff)
avoid possible array overrun
-rw-r--r--vcl/source/gdi/outmap.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index f9070439e7..e710f7329c 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -1861,9 +1861,9 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
#define ENTER3( eUnitSource, eUnitDest ) \
long nNumerator = 1; \
long nDenominator = 1; \
- DBG_ASSERT( eUnitSource < MAP_LASTENUMDUMMY, "Invalid source map unit"); \
- DBG_ASSERT( eUnitDest < MAP_LASTENUMDUMMY, "Invalid destination map unit"); \
- if( (eUnitSource < MAP_LASTENUMDUMMY) && (eUnitDest < MAP_LASTENUMDUMMY) ) \
+ DBG_ASSERT( eUnitSource <= MAP_PIXEL, "nonpermitted source map unit"); \
+ DBG_ASSERT( eUnitDest <= MAP_PIXEL, "nonpermitted destination map unit"); \
+ if( (eUnitSource <= MAP_PIXEL) && (eUnitDest <= MAP_PIXEL) ) \
{ \
nNumerator = aImplNumeratorAry[eUnitSource] * \
aImplDenominatorAry[eUnitDest]; \