From 6a46f7ff102281fc8b59191badd1d7f9f714484e Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Thu, 26 Apr 2007 09:37:02 +0000 Subject: INTEGRATION: CWS vcl75 (1.19.60); FILE MERGED 2007/03/19 16:04:45 hdu 1.19.60.1: #145566# reject bogus CMAP raw data --- vcl/source/gdi/metric.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vcl/source/gdi/metric.cxx') 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 // 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; -- cgit