Annotation of /trunk/libwmf/patches/libwmf-0.2.8.4-CVE-2007-3477.patch
Parent Directory | Revision Log
Revision 2938 -
(hide annotations)
(download)
Tue May 30 10:46:40 2017 UTC (7 years, 3 months ago) by niro
File size: 672 byte(s)
Tue May 30 10:46:40 2017 UTC (7 years, 3 months ago) by niro
File size: 672 byte(s)
-added a bunch of security patches
1 | niro | 2938 | --- libwmf-0.2.8.4/src/extra/gd/gd.c |
2 | +++ libwmf-0.2.8.4/src/extra/gd/gd.c | ||
3 | @@ -1335,10 +1335,31 @@ | ||
4 | int w2, h2; | ||
5 | w2 = w / 2; | ||
6 | h2 = h / 2; | ||
7 | - while (e < s) | ||
8 | - { | ||
9 | - e += 360; | ||
10 | - } | ||
11 | + | ||
12 | + if ((s % 360) == (e % 360)) { | ||
13 | + s = 0; e = 360; | ||
14 | + } else { | ||
15 | + if (s > 360) { | ||
16 | + s = s % 360; | ||
17 | + } | ||
18 | + | ||
19 | + if (e > 360) { | ||
20 | + e = e % 360; | ||
21 | + } | ||
22 | + | ||
23 | + while (s < 0) { | ||
24 | + s += 360; | ||
25 | + } | ||
26 | + | ||
27 | + while (e < s) { | ||
28 | + e += 360; | ||
29 | + } | ||
30 | + | ||
31 | + if (s == e) { | ||
32 | + s = 0; e = 360; | ||
33 | + } | ||
34 | + } | ||
35 | + | ||
36 | for (i = s; (i <= e); i++) | ||
37 | { | ||
38 | int x, y; |