summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2011-12-30 15:34:35 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-03 12:14:37 +0000
commit2ed05064992707efe550a70e519ea2557b7ad0f5 (patch)
tree2c514fb49dd4141a77d7442c81dec6493159bf04
parent9272288100e75317bd753e70a9ab885d9b23dff4 (diff)
downloadpoky-2ed05064992707efe550a70e519ea2557b7ad0f5.tar.gz
libpciaccess: upgrade from 0.12.1 to 0.12.902
According to http://cgit.freedesktop.org/xorg/lib/libpciaccess/log/, 0.12.902 does fix some bugs, so let's upgrade to it. Moreover, I pulled a patch from upstream git repo. I also updated the COPYING's chksum since there is a minor change to the Copyright header. (From OE-Core rev: 72c6f939c9130328045bda1c8896e078b75f07f0) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch51
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess_0.12.902.bb (renamed from meta/recipes-graphics/xorg-lib/libpciaccess_0.12.1.bb)8
2 files changed, 56 insertions, 3 deletions
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch b/meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch
new file mode 100644
index 0000000000..1933f45496
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch
@@ -0,0 +1,51 @@
1Upstream-Status: Backport
2
3The below patch is from
4http://cgit.freedesktop.org/xorg/lib/libpciaccess/commit/?id=a798395a1bfd9d06d40e2d8d14377a156c94429a
5It would appear in the next .tar.bz2 release.
6
7------------------------------
8
9commit a798395a1bfd9d06d40e2d8d14377a156c94429a
10Author: Daniel Drake <dsd@laptop.org>
11Date: Fri Nov 25 12:28:48 2011 -0600
12
13 delete_io_handle: fix deletion of last handle
14
15 When num_ios goes from 1 to 0, a realloc(ios, 0); call is made.
16 This is equivalent to free(ios) and NULL is returned.
17
18 However, the previous logic in the code incorrectly discards this NULL
19 return value. When we next call new_io_handle(), realloc(ios, X) is
20 called with "ios" pointing to freed memory. This causes glibc to abort.
21
22 Correct this logic to detect the 1-to-0 case and handle it correctly.
23 Other cases are unchanged; there is still value in checking the
24 return value from realloc() as it also returns NULL on error.
25
26 Signed-off-by: Daniel Drake <dsd@laptop.org>
27 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
28
29diff --git a/src/common_io.c b/src/common_io.c
30index f1319f8..5b35e07 100644
31--- a/src/common_io.c
32+++ b/src/common_io.c
33@@ -64,10 +64,15 @@ delete_io_handle(struct pci_io_handle *handle)
34 }
35 }
36
37- new = realloc(ios, sizeof(struct pci_io_handle) * (num_ios - 1));
38- if (new)
39- ios = new;
40 num_ios--;
41+ if (num_ios) {
42+ new = realloc(ios, sizeof(struct pci_io_handle) * num_ios);
43+ if (new)
44+ ios = new;
45+ } else {
46+ free(ios);
47+ ios = NULL;
48+ }
49 }
50
51 _pci_hidden void
diff --git a/meta/recipes-graphics/xorg-lib/libpciaccess_0.12.1.bb b/meta/recipes-graphics/xorg-lib/libpciaccess_0.12.902.bb
index b3091fd7c3..5043634fdb 100644
--- a/meta/recipes-graphics/xorg-lib/libpciaccess_0.12.1.bb
+++ b/meta/recipes-graphics/xorg-lib/libpciaccess_0.12.902.bb
@@ -5,12 +5,14 @@ PCI bus and devices in a platform-independant way."
5 5
6require xorg-lib-common.inc 6require xorg-lib-common.inc
7 7
8SRC_URI += "file://fix_deletion_of_last_handle.patch"
9
8LICENSE = "MIT & MIT-style" 10LICENSE = "MIT & MIT-style"
9LIC_FILES_CHKSUM = "file://COPYING;md5=2c765efe1e0722c1badff5e54429b102" 11LIC_FILES_CHKSUM = "file://COPYING;md5=de01cb89a769dc657d4c321c209ce4fc"
10 12
11PR = "r0" 13PR = "r0"
12 14
13DEPENDS += "xproto virtual/libx11" 15DEPENDS += "xproto virtual/libx11"
14 16
15SRC_URI[md5sum] = "d6363ee9f4df79f6fc47cba7c67b0d35" 17SRC_URI[md5sum] = "f1db198398a8a1143822acc230843e8c"
16SRC_URI[sha256sum] = "cc47d7f0e48cf4eed972916b536fdc97788d7521915e3ae1cc92d540776d7344" 18SRC_URI[sha256sum] = "0861d5bf68b598baa307e5c9b06dfd38ae03096b46e36b236106517bcd14b63a"