]> git.pld-linux.org Git - packages/libwmf.git/blame - libwmf-0.2.8.4-CVE-2007-3477.patch
- release 18
[packages/libwmf.git] / libwmf-0.2.8.4-CVE-2007-3477.patch
CommitLineData
26b0bf12
KK
1--- 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;
This page took 0.031998 seconds and 4 git commands to generate.