shithub: freetype+ttf2subf

Download patch

ref: 0e7b9f864f517dfe0bc37419c037dd299fdd2a27
parent: f01463297f3d5db9cdfa59df4714c68bbef16e89
author: Werner Lemberg <[email protected]>
date: Tue May 30 18:22:19 EDT 2017

[psaux] Correctly handle sequences of multiple number signs.

* src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero
if we encounter more than a single sign.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-05-30  Werner Lemberg  <[email protected]>
+
+	[psaux] Correctly handle sequences of multiple number signs.
+
+	* src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero
+	if we encounter more than a single sign.
+
 2017-05-29  Werner Lemberg  <[email protected]>
 
 	[pcf] 32bit integer overflow run-time errors (#46149).
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -111,6 +111,10 @@
       p++;
       if ( p == limit )
         goto Bad;
+
+      /* only a single sign is allowed */
+      if ( *p == '-' || *p == '+' )
+        return 0;
     }
 
     num_limit = 0x7FFFFFFFL / base;
@@ -215,6 +219,10 @@
       p++;
       if ( p == limit )
         goto Bad;
+
+      /* only a single sign is allowed */
+      if ( *p == '-' || *p == '+' )
+        return 0;
     }
 
     /* read the integer part */