summaryrefslogtreecommitdiffstats
path: root/src/psaux
diff options
context:
space:
mode:
Diffstat (limited to 'src/psaux')
-rw-r--r--src/psaux/afmparse.c7
-rw-r--r--src/psaux/psauxerr.h3
-rw-r--r--src/psaux/psauxmod.c2
-rw-r--r--src/psaux/psauxmod.h2
-rw-r--r--src/psaux/psconv.c16
-rw-r--r--src/psaux/psobjs.c4
-rw-r--r--src/psaux/t1cmap.c8
-rw-r--r--src/psaux/t1decode.c8
8 files changed, 28 insertions, 22 deletions
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index d7de373..5f3f9e6 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -4,7 +4,7 @@
/* */
/* AFM parser (body). */
/* */
-/* Copyright 2006, 2007, 2008, 2009, 2010 by */
+/* Copyright 2006-2010, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -631,9 +631,6 @@
tk->max_ptsize = shared_vals[3].u.f;
tk->max_kern = shared_vals[4].u.f;
- /* is this correct? */
- if ( tk->degree < 0 && tk->min_kern > 0 )
- tk->min_kern = -tk->min_kern;
break;
case AFM_TOKEN_ENDTRACKKERN:
@@ -754,7 +751,7 @@
case AFM_TOKEN_ENDFONTMETRICS:
fi->NumKernPair = n + 1;
ft_qsort( fi->KernPairs, fi->NumKernPair,
- sizeof( AFM_KernPairRec ),
+ sizeof ( AFM_KernPairRec ),
afm_compare_kern_pairs );
return PSaux_Err_Ok;
diff --git a/src/psaux/psauxerr.h b/src/psaux/psauxerr.h
index d0baa3c..d52375f 100644
--- a/src/psaux/psauxerr.h
+++ b/src/psaux/psauxerr.h
@@ -4,7 +4,7 @@
/* */
/* PS auxiliary module error codes (specification only). */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,6 +30,7 @@
#undef __FTERRORS_H__
+#undef FT_ERR_PREFIX
#define FT_ERR_PREFIX PSaux_Err_
#define FT_ERR_BASE FT_Mod_Err_PSaux
diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c
index 4c3579f..4b1249d 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -123,7 +123,7 @@
const FT_Module_Class psaux_module_class =
{
0,
- sizeof( FT_ModuleRec ),
+ sizeof ( FT_ModuleRec ),
"psaux",
0x20000L,
0x20000L,
diff --git a/src/psaux/psauxmod.h b/src/psaux/psauxmod.h
index 35e042d..1217236 100644
--- a/src/psaux/psauxmod.h
+++ b/src/psaux/psauxmod.h
@@ -28,7 +28,7 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_PIC
#error "this module does not support PIC yet"
-#endif
+#endif
FT_EXPORT_VAR( const FT_Module_Class ) psaux_driver_class;
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c
index 1531d8f..9ea7fb9 100644
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -4,7 +4,7 @@
/* */
/* Some convenience conversions (body). */
/* */
-/* Copyright 2006, 2008, 2009 by */
+/* Copyright 2006, 2008, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -79,7 +79,7 @@
FT_Bool sign = 0;
- if ( p == limit || base < 2 || base > 36 )
+ if ( p >= limit || base < 2 || base > 36 )
return 0;
if ( *p == '-' || *p == '+' )
@@ -150,7 +150,7 @@
FT_Bool sign = 0;
- if ( p == limit )
+ if ( p >= limit )
return 0;
if ( *p == '-' || *p == '+' )
@@ -346,7 +346,11 @@
#if 1
- p = *cursor;
+ p = *cursor;
+
+ if ( p >= limit )
+ return 0;
+
if ( n > (FT_UInt)( limit - p ) )
n = (FT_UInt)( limit - p );
@@ -434,6 +438,10 @@
#if 1
p = *cursor;
+
+ if ( p >= limit )
+ return 0;
+
if ( n > (FT_UInt)(limit - p) )
n = (FT_UInt)(limit - p);
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index a28b5fc..06df6e6 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2011 by */
+/* Copyright 1996-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -589,7 +589,7 @@
}
Exit:
- if ( cur == parser->cursor )
+ if ( cur < limit && cur == parser->cursor )
{
FT_ERROR(( "ps_parser_skip_PS_token:"
" current token is `%c' which is self-delimiting\n"
diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c
index f933e4d..9e5bd34 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 character map support (body). */
/* */
-/* Copyright 2002, 2003, 2006, 2007 by */
+/* Copyright 2002, 2003, 2006, 2007, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -264,8 +264,8 @@
/*************************************************************************/
FT_CALLBACK_DEF( const char * )
- t1_get_glyph_name( T1_Face face,
- FT_UInt idx )
+ psaux_get_glyph_name( T1_Face face,
+ FT_UInt idx )
{
return face->type1.glyph_names[idx];
}
@@ -282,7 +282,7 @@
return psnames->unicodes_init( memory,
unicodes,
face->type1.num_glyphs,
- (PS_GetGlyphNameFunc)&t1_get_glyph_name,
+ (PS_GetGlyphNameFunc)&psaux_get_glyph_name,
(PS_FreeGlyphNameFunc)NULL,
(FT_Pointer)face );
}
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index b3ccbdd..ea67841 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -199,7 +199,7 @@
#ifdef FT_CONFIG_OPTION_INCREMENTAL
T1_Face face = (T1_Face)decoder->builder.face;
-#endif
+#endif
if ( decoder->seac )
@@ -400,7 +400,7 @@
if ( decoder->buildchar && decoder->len_buildchar > 0 )
ft_memset( &decoder->buildchar[0],
0,
- sizeof( decoder->buildchar[0] ) * decoder->len_buildchar );
+ sizeof ( decoder->buildchar[0] ) * decoder->len_buildchar );
FT_TRACE4(( "\n"
"Start charstring\n" ));
@@ -880,7 +880,7 @@
ft_memcpy( &decoder->buildchar[idx],
blend->weight_vector,
blend->num_designs *
- sizeof( blend->weight_vector[0] ) );
+ sizeof ( blend->weight_vector[0] ) );
}
break;
@@ -1113,7 +1113,7 @@
FT_TRACE4(( "BuildCharArray = [ " ));
for ( i = 0; i < decoder->len_buildchar; ++i )
- FT_TRACE4(( "%d ", decoder->buildchar[ i ] ));
+ FT_TRACE4(( "%d ", decoder->buildchar[i] ));
FT_TRACE4(( "]\n" ));
}