shithub: freetype+ttf2subf

Download patch

ref: bc12d9e9ac7c4960ad4539a48b261193a06fad88
parent: 336735d8de0bc5f9ef8018ae11d322cb6e59fa4a
author: Alexei Podtelezhnikov <[email protected]>
date: Mon Sep 8 17:27:43 EDT 2014

Fix Savannah bug #43153.

* src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
overflow in `divider'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-09-08  Alexei Podtelezhnikov  <[email protected]>
+
+	Fix Savannah bug #43153.
+
+	* src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
+	overflow in `divider'. 
+
 2014-09-03  Alexei Podtelezhnikov  <[email protected]>
 
 	[base] Tighten the overflow check in `FT_DivFix'.
--- 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;