[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 08e89b7: [smooth] Fix integer overflow (#47114).
From: |
Alexei Podtelezhnikov |
Subject: |
[freetype2] master 08e89b7: [smooth] Fix integer overflow (#47114). |
Date: |
Wed, 17 Feb 2016 03:33:52 +0000 |
branch: master
commit 08e89b734c73fe6caa7141626637afa92c75b443
Author: Alexei Podtelezhnikov <address@hidden>
Commit: Alexei Podtelezhnikov <address@hidden>
[smooth] Fix integer overflow (#47114).
* src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
---
ChangeLog | 6 ++++++
src/smooth/ftgrays.c | 20 +-------------------
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ed7651f..66b28b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-02-16 Alexei Podtelezhnikov <address@hidden>
+
+ [smooth] Fix integer overflow (#47114).
+
+ * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
+
2016-02-15 Werner Lemberg <address@hidden>
* src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index dac332d..9411cf9 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -388,25 +388,7 @@ typedef ptrdiff_t FT_PtrDist;
typedef long TCoord; /* integer scanline/pixel coordinate */
typedef long TPos; /* sub-pixel coordinate */
-
- /* determine the type used to store cell areas. This normally takes at */
- /* least PIXEL_BITS*2 + 1 bits. On 16-bit systems, we need to use */
- /* `long' instead of `int', otherwise bad things happen */
-
-#if PIXEL_BITS <= 7
-
- typedef int TArea;
-
-#else /* PIXEL_BITS >= 8 */
-
- /* approximately determine the size of integers using an ANSI-C header */
-#if FT_UINT_MAX == 0xFFFFU
- typedef long TArea;
-#else
- typedef int TArea;
-#endif
-
-#endif /* PIXEL_BITS >= 8 */
+ typedef long TArea; /* cell areas, coordinate products */
/* maximum number of gray spans in a call to the span callback */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 08e89b7: [smooth] Fix integer overflow (#47114).,
Alexei Podtelezhnikov <=