ref: 8d6025c8da3704fe4a68860f753ce33b67014a84
parent: cd888753c8f9eb9e2142692fd35f03d8114c3067
author: Brian Nixon <[email protected]>
date: Mon May 13 05:06:42 EDT 2013
Fix Savannah bug #38970. * src/base/ftdebug.c, builds/win32/ftdebug.c, builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-05-13 Brian Nixon <[email protected]>
+
+ Fix Savannah bug #38970.
+
+ * src/base/ftdebug.c, builds/win32/ftdebug.c,
+ builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
+ (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
+
2013-05-12 Werner Lemberg <[email protected]>
[truetype] Add framework for TrueType properties.
--- a/builds/amiga/src/base/ftdebug.c
+++ b/builds/amiga/src/base/ftdebug.c
@@ -208,6 +208,9 @@
while ( *p && *p != ':' )
p++;
+ if ( !*p )
+ break;
+
if ( *p == ':' && p > q )
{
FT_Int n, i, len = (FT_Int)( p - q );
@@ -236,7 +239,7 @@
p++;
if ( *p )
{
- level = *p++ - '0';
+ level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}
--- a/builds/win32/ftdebug.c
+++ b/builds/win32/ftdebug.c
@@ -166,6 +166,9 @@
while ( *p && *p != ':' )
p++;
+ if ( !*p )
+ break;
+
if ( *p == ':' && p > q )
{
int n, i, len = p - q;
@@ -194,7 +197,7 @@
p++;
if ( *p )
{
- level = *p++ - '0';
+ level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}
--- a/builds/wince/ftdebug.c
+++ b/builds/wince/ftdebug.c
@@ -184,6 +184,9 @@
while ( *p && *p != ':' )
p++;
+ if ( !*p )
+ break;
+
if ( *p == ':' && p > q )
{
int n, i, len = p - q;
@@ -212,7 +215,7 @@
p++;
if ( *p )
{
- level = *p++ - '0';
+ level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}
--- a/src/base/ftdebug.c
+++ b/src/base/ftdebug.c
@@ -181,6 +181,9 @@
while ( *p && *p != ':' )
p++;
+ if ( !*p )
+ break;
+
if ( *p == ':' && p > q )
{
FT_Int n, i, len = (FT_Int)( p - q );
@@ -209,7 +212,7 @@
p++;
if ( *p )
{
- level = *p++ - '0';
+ level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}