summaryrefslogtreecommitdiff
path: root/print/freetype2
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2006-08-22 21:45:01 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2006-08-22 21:45:01 +0000
commit1ea8b05a1a30127f2b5da29818c6e545ba7d2619 (patch)
tree9a0354e9f27293950e360c23d420ebe15944485a /print/freetype2
parentAdd patches to correct the security issues described in CVE-2006-3467. (diff)
Correct patches for freetype2-2.1.x.
Notes
Notes: svn path=/head/; revision=171221
Diffstat (limited to 'print/freetype2')
-rw-r--r--print/freetype2/files/patch-src_pcf_pcfdrivr.c (renamed from print/freetype2/files/patch-src_pcf_pcfdriver.c)29
-rw-r--r--print/freetype2/files/patch-src_pcf_pcfread.c31
2 files changed, 29 insertions, 31 deletions
diff --git a/print/freetype2/files/patch-src_pcf_pcfdriver.c b/print/freetype2/files/patch-src_pcf_pcfdrivr.c
index 01758d8a9091..a12810cc3324 100644
--- a/print/freetype2/files/patch-src_pcf_pcfdriver.c
+++ b/print/freetype2/files/patch-src_pcf_pcfdrivr.c
@@ -1,6 +1,6 @@
---- src/pcf/pcfdrivr.c.orig 2006-02-17 07:40:36.000000000 +0100
-+++ src/pcf/pcfdrivr.c
-@@ -203,19 +203,23 @@ THE SOFTWARE.
+--- src/pcf/pcfdrivr.c.orig Wed Jul 28 00:09:02 2004
++++ src/pcf/pcfdrivr.c Tue Aug 22 21:39:43 2006
+@@ -203,19 +203,24 @@ THE SOFTWARE.
/* free properties */
{
@@ -13,25 +13,26 @@
+ if ( face->properties )
{
- prop = &face->properties[i];
-+ for ( i = 0; i < face->nprops; i++ )
++ for ( i = 0; i < face->nprops; i++ )
+ {
+ prop = &face->properties[i];
- FT_FREE( prop->name );
- if ( prop->isString )
-- FT_FREE( prop->value.atom );
-+ if ( prop ) {
+- FT_FREE( prop->value );
+- }
++ if ( prop ) {
+ FT_FREE( prop->name );
-+ if ( prop->isString )
-+ FT_FREE( prop->value.atom );
-+ }
-+ }
- }
--
++ if ( prop->isString )
++ FT_FREE( prop->value.atom );
++ }
++ }
+
++ }
FT_FREE( face->properties );
}
-@@ -258,6 +262,8 @@ THE SOFTWARE.
+@@ -258,6 +263,8 @@ THE SOFTWARE.
FT_Error error2;
@@ -40,7 +41,7 @@
/* this didn't work, try gzip support! */
error2 = FT_Stream_OpenGzip( &face->gzip_stream, stream );
if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature )
-@@ -357,6 +363,7 @@ THE SOFTWARE.
+@@ -357,6 +364,7 @@ THE SOFTWARE.
Fail:
FT_TRACE2(( "[not a valid PCF file]\n" ));
diff --git a/print/freetype2/files/patch-src_pcf_pcfread.c b/print/freetype2/files/patch-src_pcf_pcfread.c
index c9117f2062cc..227f5e146ae4 100644
--- a/print/freetype2/files/patch-src_pcf_pcfread.c
+++ b/print/freetype2/files/patch-src_pcf_pcfread.c
@@ -1,5 +1,5 @@
---- src/pcf/pcfread.c.orig 2006-01-23 17:35:18.000000000 +0100
-+++ src/pcf/pcfread.c
+--- src/pcf/pcfread.c.orig Sun May 1 15:38:55 2005
++++ src/pcf/pcfread.c Tue Aug 22 21:43:41 2006
@@ -102,7 +102,8 @@ THE SOFTWARE.
return PCF_Err_Cannot_Open_Resource;
@@ -345,7 +345,7 @@
return error;
}
-@@ -597,14 +688,16 @@ THE SOFTWARE.
+@@ -598,14 +689,16 @@ THE SOFTWARE.
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
return PCF_Err_Invalid_File_Format;
@@ -364,7 +364,7 @@
for ( i = 0; i < nbitmaps; i++ )
{
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
-@@ -612,7 +705,7 @@ THE SOFTWARE.
+@@ -613,7 +706,7 @@ THE SOFTWARE.
else
(void)FT_READ_LONG_LE( offsets[i] );
@@ -373,7 +373,7 @@
i, offsets[i], offsets[i] ));
}
if ( error )
-@@ -640,15 +733,22 @@ THE SOFTWARE.
+@@ -641,13 +734,20 @@ THE SOFTWARE.
FT_UNUSED( sizebitmaps ); /* only used for debugging */
for ( i = 0; i < nbitmaps; i++ )
@@ -381,10 +381,10 @@
+ {
+ /* rough estimate */
+ if ( ( offsets[i] < 0 ) ||
-+ ( (FT_ULong)offsets[i] > size ) )
++ ( (FT_ULong)offsets[i] > size ) )
+ {
+ FT_ERROR(( "pcf_get_bitmaps:"));
-+ FT_ERROR(( " invalid offset to bitmap data of glyph %d\n", i ));
++ FT_ERROR(( " invalid offset to bitmap data of glyph %d\n", i ));
+ }
+ else
+ face->metrics[i].bits = stream->pos + offsets[i];
@@ -396,12 +396,9 @@
- return error;
-
Bail:
-- FT_FREE ( offsets );
-+ FT_FREE( offsets );
- return error;
- }
-
-@@ -734,7 +834,7 @@ THE SOFTWARE.
+ FT_FREE ( offsets );
+ FT_FREE ( bitmaps );
+@@ -736,7 +836,7 @@ THE SOFTWARE.
tmpEncoding[j].glyph = (FT_Short)encodingOffset;
@@ -410,7 +407,7 @@
tmpEncoding[j].enc, tmpEncoding[j].enc,
tmpEncoding[j].glyph ));
-@@ -828,7 +928,8 @@ THE SOFTWARE.
+@@ -830,7 +930,8 @@ THE SOFTWARE.
if ( error )
goto Bail;
@@ -420,7 +417,7 @@
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) &&
!PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) )
-@@ -876,7 +977,6 @@ THE SOFTWARE.
+@@ -878,7 +979,6 @@ THE SOFTWARE.
accel->ink_minbounds = accel->minbounds; /* I'm not sure about this */
accel->ink_maxbounds = accel->maxbounds;
}
@@ -428,7 +425,7 @@
Bail:
return error;
-@@ -1082,11 +1182,12 @@ THE SOFTWARE.
+@@ -1084,11 +1184,12 @@ THE SOFTWARE.
else
root->family_name = NULL;
@@ -444,7 +441,7 @@
*/
root->num_glyphs = face->nmetrics + 1;
-@@ -1171,7 +1272,7 @@ THE SOFTWARE.
+@@ -1170,7 +1271,7 @@ THE SOFTWARE.
Exit:
if ( error )
{