diff options
| author | Dave Arnold <darnold@adobe.com> | 2014-02-28 07:42:42 +0100 |
|---|---|---|
| committer | Werner Lemberg <wl@gnu.org> | 2014-02-28 07:45:07 +0100 |
| commit | 135c3faebb96f8f550bd4f318716f2e1e095a969 (patch) | |
| tree | 5172f674fa0ed94c7225af8ba8f19c3a696e9b5c | |
| parent | 0eae6eb0645264c98812f0095e0f5df4541830e6 (diff) | |
| download | freetype2-135c3faebb96f8f550bd4f318716f2e1e095a969.tar.gz | |
Fix Savannah bug #41697, part 2.
* src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
cf2_initGlobalRegionBuffer): It is possible for a charstring to call
a subroutine if no subroutines exist. This is an error but should
not trigger an assert. Split the assert to account for this.
| -rw-r--r-- | ChangeLog | 9 | ||||
| -rw-r--r-- | src/cff/cf2ft.c | 8 |
2 files changed, 15 insertions, 2 deletions
@@ -1,5 +1,14 @@ 2014-02-28 Dave Arnold <darnold@adobe.com> + [cff] Fix Savannah bug #41697, part 2. + + * src/cff/cf2ft.c (cf2_initLocalRegionBuffer, + cf2_initGlobalRegionBuffer): It is possible for a charstring to call + a subroutine if no subroutines exist. This is an error but should + not trigger an assert. Split the assert to account for this. + +2014-02-28 Dave Arnold <darnold@adobe.com> + [cff] Fix Savannah bug #41697, part 1. * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is diff --git a/src/cff/cf2ft.c b/src/cff/cf2ft.c index df5f8fb..82bac75 100644 --- a/src/cff/cf2ft.c +++ b/src/cff/cf2ft.c @@ -521,7 +521,7 @@ CF2_UInt idx, CF2_Buffer buf ) { - FT_ASSERT( decoder && decoder->globals ); + FT_ASSERT( decoder ); FT_ZERO( buf ); @@ -529,6 +529,8 @@ if ( idx >= decoder->num_globals ) return TRUE; /* error */ + FT_ASSERT( decoder->globals ); + buf->start = buf->ptr = decoder->globals[idx]; buf->end = decoder->globals[idx + 1]; @@ -594,7 +596,7 @@ CF2_UInt idx, CF2_Buffer buf ) { - FT_ASSERT( decoder && decoder->locals ); + FT_ASSERT( decoder ); FT_ZERO( buf ); @@ -602,6 +604,8 @@ if ( idx >= decoder->num_locals ) return TRUE; /* error */ + FT_ASSERT( decoder->locals ); + buf->start = buf->ptr = decoder->locals[idx]; buf->end = decoder->locals[idx + 1]; |
