]> git.pld-linux.org Git - packages/libwmf.git/blob - libwmf-0.2.8.4-CVE-2007-3477.patch
- release 22 (by relup.sh)
[packages/libwmf.git] / libwmf-0.2.8.4-CVE-2007-3477.patch
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.028705 seconds and 3 git commands to generate.