/[gentoo-x86]/x11-base/xorg-server/files/xorg-xserver-1.4-cve-2008-2360.diff
Gentoo

Contents of /x11-base/xorg-server/files/xorg-xserver-1.4-cve-2008-2360.diff

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Sep 28 07:41:03 2009 UTC (4 years, 10 months ago) by remi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
FILE REMOVED
x11-base/xorg-server: drop old ebuilds, prune ${FILESDIR}
(Portage version: 2.2_rc42/cvs/Linux i686)

1 diff --git a/render/glyph.c b/render/glyph.c
2 index 583a52b..42ae65d 100644
3 --- a/render/glyph.c
4 +++ b/render/glyph.c
5 @@ -42,6 +42,12 @@
6 #include "picturestr.h"
7 #include "glyphstr.h"
8
9 +#if HAVE_STDINT_H
10 +#include <stdint.h>
11 +#elif !defined(UINT32_MAX)
12 +#define UINT32_MAX 0xffffffffU
13 +#endif
14 +
15 /*
16 * From Knuth -- a good choice for hash/rehash values is p, p-2 where
17 * p and p-2 are both prime. These tables are sized to have an extra 10%
18 @@ -626,8 +632,12 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
19 int size;
20 GlyphPtr glyph;
21 int i;
22 -
23 - size = gi->height * PixmapBytePad (gi->width, glyphDepths[fdepth]);
24 + size_t padded_width;
25 +
26 + padded_width = PixmapBytePad (gi->width, glyphDepths[fdepth]);
27 + if (gi->height && padded_width > (UINT32_MAX - sizeof(GlyphRec))/gi->height)
28 + return 0;
29 + size = gi->height * padded_width;
30 glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec));
31 if (!glyph)
32 return 0;

  ViewVC Help
Powered by ViewVC 1.1.20