diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-01-29 15:08:31 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-01-29 15:08:31 +0000 |
commit | 8b60389d7c3665e17a989b8baff837900308a009 (patch) | |
tree | b4e0d69a5e3128989a05430d00b2f71f6cea9a66 | |
parent | eed9ff83d140cef2bc7faeaf1e8cd733eb68d508 (diff) |
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)
-rw-r--r-- | psprint/source/fontmanager/parseAFM.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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(); |