Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/imlib/files: imlib-1.9.15-bpp16-CVE-2007-3568.patch digest-imlib-1.9.15-r2 imlib-1.9.15-fix-rendering.patch
Date: Mon, 10 Dec 2007 20:14:35
Message-Id: E1J1p1J-0000ea-MF@stork.gentoo.org
1 pva 07/12/10 20:14:29
2
3 Added: imlib-1.9.15-bpp16-CVE-2007-3568.patch
4 digest-imlib-1.9.15-r2
5 imlib-1.9.15-fix-rendering.patch
6 Log:
7 Fixed denial of service (infinite loop) via a BMP image, bug #201887.
8 Fixed bug which prevented imlib to render images is MIT-SHM when the MIT-SHM extension doesn't support shared pixmaps (bugs.debian.org/448360). Thank for report Antti Mäkelä <zarhan AT cs.tut.fi>.
9 Homepage changed. No website is available for this old library, so pointing to sources location.
10 (Portage version: 2.1.3.19)
11
12 Revision Changes Path
13 1.1 media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch
14
15 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch?rev=1.1&content-type=text/plain
17
18 Index: imlib-1.9.15-bpp16-CVE-2007-3568.patch
19 ===================================================================
20 --- Imlib/load.c.orig 2007-08-13 23:06:20.000000000 -0300
21 +++ Imlib/load.c 2007-08-13 23:06:51.000000000 -0300
22 @@ -645,7 +645,7 @@
23 planes = (int)word;
24 fread(&word, 2, 1, file);
25 bpp = (int)word;
26 - if (bpp != 1 && bpp != 4 && bpp != 8 && bpp && 16 && bpp != 24 && bpp != 32)
27 + if (bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32)
28 {
29 fprintf(stderr, "IMLIB ERROR: unknown bitdepth in file\n");
30 return NULL;
31
32
33
34 1.1 media-libs/imlib/files/digest-imlib-1.9.15-r2
35
36 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/imlib/files/digest-imlib-1.9.15-r2?rev=1.1&view=markup
37 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/imlib/files/digest-imlib-1.9.15-r2?rev=1.1&content-type=text/plain
38
39 Index: digest-imlib-1.9.15-r2
40 ===================================================================
41 MD5 7db987e6c52e4daf70d7d0f471238eae imlib-1.9.15.tar.bz2 683242
42 RMD160 195b80833167134ba2d9a9574d420279f9cf55f4 imlib-1.9.15.tar.bz2 683242
43 SHA256 4e6a270308a9ae16586bfc133c1a3dfb2e56f431edb66aaa3a80e36e5ed84ce0 imlib-1.9.15.tar.bz2 683242
44
45
46
47 1.1 media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch
48
49 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch?rev=1.1&content-type=text/plain
51
52 Index: imlib-1.9.15-fix-rendering.patch
53 ===================================================================
54 Michel Dänzer <daenzer AT debian.org>
55
56 * The boolean value returned via the last parameter to XShmQueryVersion()
57 isn't honoured everywhere.
58 * The init functions that take parameters allow the caller to enable shared
59 pixmaps when they aren't supported (or disabled by configuration files).
60
61
62 These result in incorrect rendering when the MIT-SHM extension doesn't support
63 shared pixmaps, e.g. using EXA with current versions of Xorg.
64
65 http://bugs.gentoo.org/show_bug.cgi?id=197489
66
67 diff -up -ru imlib-1.9.15.orig/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
68 --- imlib-1.9.15.orig/gdk_imlib/misc.c 2002-03-04 18:06:32.000000000 +0100
69 +++ imlib-1.9.15/gdk_imlib/misc.c 2007-10-28 14:00:04.000000000 +0100
70 @@ -674,6 +674,10 @@ gdk_imlib_init_params(GdkImlibInitParams
71 visual = gdk_rgb_get_visual();
72 id->x.visual = GDK_VISUAL_XVISUAL(visual); /* the visual type */
73 id->x.depth = visual->depth; /* the depth of the screen in bpp */
74 +
75 + id->x.shm = 0;
76 + id->x.shmp = 0;
77 + id->max_shm = 0;
78 #ifdef HAVE_SHM
79 if (XShmQueryExtension(id->x.disp))
80 {
81 @@ -689,17 +693,14 @@ gdk_imlib_init_params(GdkImlibInitParams
82 id->x.last_xim = NULL;
83 id->x.last_sxim = NULL;
84 id->max_shm = 0x7fffffff;
85 - if (XShmPixmapFormat(id->x.disp) == ZPixmap)
86 + if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
87 + (pm == True))
88 id->x.shmp = 1;
89 }
90 }
91 }
92 - else
93 #endif
94 - {
95 - id->x.shm = 0;
96 - id->x.shmp = 0;
97 - }
98 +
99 id->cache.on_image = 0;
100 id->cache.size_image = 0;
101 id->cache.num_image = 0;
102 @@ -935,8 +936,8 @@ gdk_imlib_init_params(GdkImlibInitParams
103 }
104 if (p->flags & PARAMS_SHAREDPIXMAPS)
105 {
106 - if (id->x.shm)
107 - id->x.shmp = p->sharedpixmaps;
108 + if (!p->sharedpixmaps)
109 + id->x.shmp = 0;
110 }
111 if (p->flags & PARAMS_PALETTEOVERRIDE)
112 override = p->paletteoverride;
113 diff -up -ru imlib-1.9.15.orig/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
114 --- imlib-1.9.15.orig/Imlib/misc.c 2004-09-21 02:22:59.000000000 +0200
115 +++ imlib-1.9.15/Imlib/misc.c 2007-10-28 14:00:23.000000000 +0100
116 @@ -675,6 +675,10 @@ Imlib_init_with_params(Display * disp, I
117 id->x.root = DefaultRootWindow(disp); /* the root window id */
118 id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */
119 id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */
120 +
121 + id->x.shm = 0;
122 + id->x.shmp = 0;
123 + id->max_shm = 0;
124 #ifdef HAVE_SHM
125 if (XShmQueryExtension(id->x.disp))
126 {
127 @@ -690,17 +694,14 @@ Imlib_init_with_params(Display * disp, I
128 id->x.last_xim = NULL;
129 id->x.last_sxim = NULL;
130 id->max_shm = 0x7fffffff;
131 - if (XShmPixmapFormat(id->x.disp) == ZPixmap)
132 + if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
133 + (pm == True)))
134 id->x.shmp = 1;
135 }
136 }
137 }
138 - else
139 #endif
140 - {
141 - id->x.shm = 0;
142 - id->x.shmp = 0;
143 - }
144 +
145 id->cache.on_image = 0;
146 id->cache.size_image = 0;
147 id->cache.num_image = 0;
148 @@ -952,8 +953,8 @@ Imlib_init_with_params(Display * disp, I
149 }
150 if (p->flags & PARAMS_SHAREDPIXMAPS)
151 {
152 - if (id->x.shm)
153 - id->x.shmp = p->sharedpixmaps;
154 + if (!p->sharedpixmaps)
155 + id->x.shmp = 0;
156 }
157 if (p->flags & PARAMS_PALETTEOVERRIDE)
158 override = p->paletteoverride;
159
160
161
162 --
163 gentoo-commits@g.o mailing list