diff options
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch')
-rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch deleted file mode 100644 index 574abe0e42..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 4bef1a1d32e29b68855616020dbff574b9cda08f Mon Sep 17 00:00:00 2001 | ||
2 | From: Robin Watts <Robin.Watts@artifex.com> | ||
3 | Date: Thu, 29 Dec 2016 15:57:43 +0000 | ||
4 | Subject: [PATCH] Bug 697453: Avoid divide by 0 in scan conversion code. | ||
5 | |||
6 | Arithmetic overflow due to extreme values in the scan conversion | ||
7 | code can cause a division by 0. | ||
8 | |||
9 | Avoid this with a simple extra check. | ||
10 | |||
11 | dx_old=cf814d81 | ||
12 | endp->x_next=b0e859b9 | ||
13 | alp->x_next=8069a73a | ||
14 | |||
15 | leads to dx_den = 0 | ||
16 | |||
17 | Upstream-Status: Backport | ||
18 | CVE: CVE-2016-10219 | ||
19 | |||
20 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
21 | --- | ||
22 | base/gxfill.c | 4 ++-- | ||
23 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/base/gxfill.c b/base/gxfill.c | ||
26 | index 99196c0..2f81bb0 100644 | ||
27 | --- a/base/gxfill.c | ||
28 | +++ b/base/gxfill.c | ||
29 | @@ -1741,7 +1741,7 @@ intersect(active_line *endp, active_line *alp, fixed y, fixed y1, fixed *p_y_new | ||
30 | fixed dx_old = alp->x_current - endp->x_current; | ||
31 | fixed dx_den = dx_old + endp->x_next - alp->x_next; | ||
32 | |||
33 | - if (dx_den <= dx_old) | ||
34 | + if (dx_den <= dx_old || dx_den == 0) | ||
35 | return false; /* Intersection isn't possible. */ | ||
36 | dy = y1 - y; | ||
37 | if_debug3('F', "[F]cross: dy=%g, dx_old=%g, dx_new=%g\n", | ||
38 | @@ -1750,7 +1750,7 @@ intersect(active_line *endp, active_line *alp, fixed y, fixed y1, fixed *p_y_new | ||
39 | /* Do the computation in single precision */ | ||
40 | /* if the values are small enough. */ | ||
41 | y_new = | ||
42 | - ((dy | dx_old) < 1L << (size_of(fixed) * 4 - 1) ? | ||
43 | + (((ufixed)(dy | dx_old)) < (1L << (size_of(fixed) * 4 - 1)) ? | ||
44 | dy * dx_old / dx_den : | ||
45 | (INCR_EXPR(mq_cross), fixed_mult_quo(dy, dx_old, dx_den))) | ||
46 | + y; | ||
47 | -- | ||
48 | 2.10.2 | ||
49 | |||