Fix Savannah bug #43153.

* src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
overflow in `divider'.
This commit is contained in:
Alexei Podtelezhnikov 2014-09-08 21:27:43 -04:00
parent 336735d8de
commit bc12d9e9ac
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
Fix Savannah bug #43153.
* src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
overflow in `divider'.
2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Tighten the overflow check in `FT_DivFix'.

View File

@ -250,7 +250,8 @@
if ( c < 0 || c >= 10 )
break;
if ( decimal < 0xCCCCCCCL )
/* only add digit if we don't overflow */
if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL )
{
decimal = decimal * 10 + c;