diff options
author | Makoto Onuki <omakoto@google.com> | 2015-06-10 21:25:01 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-06-10 21:25:01 +0000 |
commit | 18842aab597e368aab097e03643790c74962a71e (patch) | |
tree | 7e67208cafc4572557e8d10469fb5dc173ca2edf /src/psaux/psconv.c | |
parent | 53c63001c4458baab36b4e38230f6b92ea6d5383 (diff) | |
parent | fb6b5b10aaa74b8c8974714b41bac35bdd1c772d (diff) | |
download | android_external_freetype-18842aab597e368aab097e03643790c74962a71e.tar.gz android_external_freetype-18842aab597e368aab097e03643790c74962a71e.tar.bz2 android_external_freetype-18842aab597e368aab097e03643790c74962a71e.zip |
Merge "Update to freetype 2.6.0"stable/cm-12.1-YOG7Dstable/cm-12.1-YOG4Pcm-12.1
Diffstat (limited to 'src/psaux/psconv.c')
-rw-r--r-- | src/psaux/psconv.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c index d0d8861..aca7412 100644 --- a/src/psaux/psconv.c +++ b/src/psaux/psconv.c @@ -4,7 +4,7 @@ /* */ /* Some convenience conversions (body). */ /* */ -/* Copyright 2006, 2008, 2009, 2012-2013 by */ +/* Copyright 2006-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -124,7 +124,7 @@ if ( IS_PS_SPACE( *p ) || *p OP 0x80 ) break; - c = ft_char_table[*p & 0x7f]; + c = ft_char_table[*p & 0x7F]; if ( c < 0 || c >= base ) break; @@ -245,12 +245,13 @@ if ( IS_PS_SPACE( *p ) || *p OP 0x80 ) break; - c = ft_char_table[*p & 0x7f]; + c = ft_char_table[*p & 0x7F]; if ( c < 0 || c >= 10 ) break; - if ( decimal < 0xCCCCCCCL ) + /* only add digit if we don't overflow */ + if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL ) { decimal = decimal * 10 + c; @@ -488,8 +489,8 @@ if ( c OP 0x80 ) break; - c = ft_char_table[c & 0x7F]; - if ( (unsigned)c >= 16 ) + c = (FT_UInt)ft_char_table[c & 0x7F]; + if ( c >= 16 ) break; pad = ( pad << 4 ) | c; @@ -520,7 +521,7 @@ if ( *p OP 0x80 ) break; - c = ft_char_table[*p & 0x7f]; + c = ft_char_table[*p & 0x7F]; if ( (unsigned)c >= 16 ) break; |