Imported Debian patch 2:1.15.1-0ubuntu2.6
[deb_xorg-server.git] / debian / patches / CVE-2014-8xxx / 0000-regionsize-size_t.patch
CommitLineData
7217e0ca
ML
1From 995ecfb51d4ab8197e4591d5c0957e08a0bd6a59 Mon Sep 17 00:00:00 2001
2From: Peter Hutterer <peter.hutterer@who-t.net>
3Date: Thu, 30 Oct 2014 09:00:21 +1000
4Subject: include: change RegionSize() to take a size_t
5
6/usr/include/xorg/regionstr.h:130:36: warning: implicit conversion changes
7signedness: 'int' to 'unsigned long' [-Wsign-conversion]
8 return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
9 ^ ~
10
11Really only just pushes the problem to the caller, but maybe that motivates
12someone to fix it.
13
14Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15
16diff --git a/include/regionstr.h b/include/regionstr.h
17index 4a0725d..515e93f 100644
18--- a/include/regionstr.h
19+++ b/include/regionstr.h
20@@ -125,7 +125,7 @@ RegionEnd(RegionPtr reg)
21 }
22
23 static inline size_t
24-RegionSizeof(int n)
25+RegionSizeof(size_t n)
26 {
27 return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
28 }
29--
30cgit v0.10.2
31