ref: 6e722f2eaa5840e6b8c6f1eaa6a1fce9d7f90833
parent: 8ed5a2477eecf27e645bbb568b66a37eea12973c
author: Alexei Podtelezhnikov <[email protected]>
date: Fri Jun 19 04:39:23 EDT 2020
[base] Rework d1180b5f9598 until further notice. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Reject large outlines.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-06-19 Alexei Podtelezhnikov <[email protected]>
+
+ [base] Rework d1180b5f9598 until further notice.
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Reject large
+ outlines.
+
2020-06-19 Sebastian Rasmussen <[email protected]>
[cff, cid] Fix segfaults in case of error (#58621).
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -1060,11 +1060,9 @@
if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax )
return FT_ORIENTATION_NONE;
- /* Reject values larger than 32bit. */
- if ( (unsigned long)cbox.xMin > 0xFFFFFFFFUL ||
- (unsigned long)cbox.xMax > 0xFFFFFFFFUL ||
- (unsigned long)cbox.yMin > 0xFFFFFFFFUL ||
- (unsigned long)cbox.yMax > 0xFFFFFFFFUL )
+ /* Reject values large outlines. */
+ if ( cbox.xMin < -0x1000000L || cbox.yMin < -0x1000000L ||
+ cbox.xMax > 0x1000000L || cbox.yMax > 0x1000000L )
return FT_ORIENTATION_NONE;
xshift = FT_MSB( (FT_UInt32)( FT_ABS( cbox.xMax ) |