diff --git a/ChangeLog b/ChangeLog index 77b2bc705..2dc6f6e8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-09-08 Alexei Podtelezhnikov + + Fix Savannah bug #43153. + + * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against + overflow in `divider'. + 2014-09-03 Alexei Podtelezhnikov [base] Tighten the overflow check in `FT_DivFix'. diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c index d0d8861c2..7792a6294 100644 --- a/src/psaux/psconv.c +++ b/src/psaux/psconv.c @@ -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;