Fix more 32bit issues (#54208)
* src/cff/cffload.c (cff_blend_build_vector): Convert assertion into run-time error. * src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against numeric overflow.
This commit is contained in:
parent
29f05fd02d
commit
6ceeb87f5d
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2018-07-05 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Fix more 32bit issues (#54208)
|
||||||
|
|
||||||
|
* src/cff/cffload.c (cff_blend_build_vector): Convert assertion into
|
||||||
|
run-time error.
|
||||||
|
|
||||||
|
* src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against
|
||||||
|
numeric overflow.
|
||||||
|
|
||||||
2018-07-04 Werner Lemberg <wl@gnu.org>
|
2018-07-04 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
Fix 32bit build warnings (#54239).
|
Fix 32bit build warnings (#54239).
|
||||||
|
|
|
@ -1398,7 +1398,14 @@
|
||||||
FT_UInt master;
|
FT_UInt master;
|
||||||
|
|
||||||
|
|
||||||
FT_ASSERT( lenNDV == 0 || NDV );
|
/* protect against malformed fonts */
|
||||||
|
if ( !( lenNDV == 0 || NDV ) )
|
||||||
|
{
|
||||||
|
FT_TRACE4(( " cff_blend_build_vector:"
|
||||||
|
" Malformed Normalize Design Vector data\n" ));
|
||||||
|
error = FT_THROW( Invalid_File_Format );
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
blend->builtBV = FALSE;
|
blend->builtBV = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -1780,11 +1780,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( coord < a->def )
|
if ( coord < a->def )
|
||||||
normalized[i] = -FT_DivFix( coord - a->def,
|
normalized[i] = -FT_DivFix( SUB_LONG( coord, a->def ),
|
||||||
a->minimum - a->def );
|
SUB_LONG( a->minimum, a->def ) );
|
||||||
else if ( coord > a->def )
|
else if ( coord > a->def )
|
||||||
normalized[i] = FT_DivFix( coord - a->def,
|
normalized[i] = FT_DivFix( SUB_LONG( coord, a->def ),
|
||||||
a->maximum - a->def );
|
SUB_LONG( a->maximum, a->def ) );
|
||||||
else
|
else
|
||||||
normalized[i] = 0;
|
normalized[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue