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.
This commit is contained in:
parent
0eae6eb064
commit
135c3faebb
|
@ -1,3 +1,12 @@
|
||||||
|
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>
|
2014-02-28 Dave Arnold <darnold@adobe.com>
|
||||||
|
|
||||||
[cff] Fix Savannah bug #41697, part 1.
|
[cff] Fix Savannah bug #41697, part 1.
|
||||||
|
|
|
@ -521,7 +521,7 @@
|
||||||
CF2_UInt idx,
|
CF2_UInt idx,
|
||||||
CF2_Buffer buf )
|
CF2_Buffer buf )
|
||||||
{
|
{
|
||||||
FT_ASSERT( decoder && decoder->globals );
|
FT_ASSERT( decoder );
|
||||||
|
|
||||||
FT_ZERO( buf );
|
FT_ZERO( buf );
|
||||||
|
|
||||||
|
@ -529,6 +529,8 @@
|
||||||
if ( idx >= decoder->num_globals )
|
if ( idx >= decoder->num_globals )
|
||||||
return TRUE; /* error */
|
return TRUE; /* error */
|
||||||
|
|
||||||
|
FT_ASSERT( decoder->globals );
|
||||||
|
|
||||||
buf->start =
|
buf->start =
|
||||||
buf->ptr = decoder->globals[idx];
|
buf->ptr = decoder->globals[idx];
|
||||||
buf->end = decoder->globals[idx + 1];
|
buf->end = decoder->globals[idx + 1];
|
||||||
|
@ -594,7 +596,7 @@
|
||||||
CF2_UInt idx,
|
CF2_UInt idx,
|
||||||
CF2_Buffer buf )
|
CF2_Buffer buf )
|
||||||
{
|
{
|
||||||
FT_ASSERT( decoder && decoder->locals );
|
FT_ASSERT( decoder );
|
||||||
|
|
||||||
FT_ZERO( buf );
|
FT_ZERO( buf );
|
||||||
|
|
||||||
|
@ -602,6 +604,8 @@
|
||||||
if ( idx >= decoder->num_locals )
|
if ( idx >= decoder->num_locals )
|
||||||
return TRUE; /* error */
|
return TRUE; /* error */
|
||||||
|
|
||||||
|
FT_ASSERT( decoder->locals );
|
||||||
|
|
||||||
buf->start =
|
buf->start =
|
||||||
buf->ptr = decoder->locals[idx];
|
buf->ptr = decoder->locals[idx];
|
||||||
buf->end = decoder->locals[idx + 1];
|
buf->end = decoder->locals[idx + 1];
|
||||||
|
|
Loading…
Reference in New Issue