summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2009-06-19 23:50:37 +0200
committerWerner Lemberg <wl@gnu.org>2009-06-19 23:50:37 +0200
commitf1631f2db054d8f49115fda1e254a479c4cdc9fe (patch)
treef894032bd400f2fbb20c119316df1b02bdb0694e /src
parent86fa2ebc1f2a73693b5da1076a0871439256db2b (diff)
downloadfreetype2-f1631f2db054d8f49115fda1e254a479c4cdc9fe.tar.gz
[cff] Fix handling of reserved byte 0xFF.
* src/cff/cffgload.c (cff_decoder_parse_charstrings): Abort if byte 0xFF is encountered.
Diffstat (limited to 'src')
-rw-r--r--src/cff/cffgload.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 03956cab8..6cb26a43e 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -938,17 +938,9 @@
goto Syntax_Error;
val = -( (FT_Long)v - 251 ) * 256 - *ip++ - 108;
}
- else
- {
- if ( ip + 3 >= limit )
- goto Syntax_Error;
- val = ( (FT_Int32)ip[0] << 24 ) |
- ( (FT_Int32)ip[1] << 16 ) |
- ( (FT_Int32)ip[2] << 8 ) |
- ip[3];
- ip += 4;
- shift = 0;
- }
+ else /* 255 */
+ goto Syntax_Error;
+
if ( decoder->top - stack >= CFF_MAX_OPERANDS )
goto Stack_Overflow;