diff options
Diffstat (limited to 'vcl/source/gdi/metric.cxx')
-rw-r--r-- | vcl/source/gdi/metric.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index c61758e5983b..d1cf4c36b3fc 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -4,9 +4,9 @@ * * $RCSfile: metric.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: ihi $ $Date: 2006-12-21 12:02:38 $ + * last change: $Author: rt $ $Date: 2007-04-26 10:37:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -483,6 +483,9 @@ static int GetSShort( const unsigned char* p ){ return((static_cast<signed char> // TODO: move CMAP parsing directly into the ImplFontCharMap class bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult ) { + if( !pCmap || (nLength < 24) ) + return false; + rResult.mpPairCodes = NULL; rResult.mpStartGlyphs= NULL; rResult.mnPairCount = 0; |