From 8b60389d7c3665e17a989b8baff837900308a009 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Tue, 29 Jan 2008 15:08:31 +0000 Subject: INTEGRATION: CWS vcl85_SRC680 (1.10.62); FILE MERGED 2008/01/07 16:08:41 pl 1.10.62.1: #i85055# fix a buffer overflow (thanks cmc) --- psprint/source/fontmanager/parseAFM.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'psprint') diff --git a/psprint/source/fontmanager/parseAFM.cxx b/psprint/source/fontmanager/parseAFM.cxx index dfd3347e626b..2d8a7817df52 100644 --- a/psprint/source/fontmanager/parseAFM.cxx +++ b/psprint/source/fontmanager/parseAFM.cxx @@ -46,9 +46,9 @@ * * $RCSfile: parseAFM.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: ihi $ $Date: 2006-12-21 11:54:43 $ + * last change: $Author: rt $ $Date: 2008-01-29 16:08:31 $ * ************************************************************************/ @@ -285,7 +285,7 @@ static char *token( FileInputStream* stream, int& rLen ) ; idx = 0; - while( ch != -1 && ! is_delimiter_Array[ ch & 255 ] ) + while( ch != -1 && ! is_delimiter_Array[ ch & 255 ] && idx < MAX_NAME-1 ) { ident[idx++] = ch; ch = stream->getChar(); @@ -317,7 +317,7 @@ static char *linetoken( FileInputStream* stream ) while ((ch = stream->getChar()) == ' ' || ch == '\t' ); idx = 0; - while (ch != -1 && ch != lineterm && ch != '\r') + while (ch != -1 && ch != lineterm && ch != '\r' && idx < MAX_NAME-1 ) { ident[idx++] = ch; ch = stream->getChar(); -- cgit