diff options
author | Dexuan Cui <dexuan.cui@intel.com> | 2011-12-30 15:34:35 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-03 12:14:37 +0000 |
commit | 2ed05064992707efe550a70e519ea2557b7ad0f5 (patch) | |
tree | 2c514fb49dd4141a77d7442c81dec6493159bf04 | |
parent | 9272288100e75317bd753e70a9ab885d9b23dff4 (diff) | |
download | poky-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.patch | 51 | ||||
-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 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | The below patch is from | ||
4 | http://cgit.freedesktop.org/xorg/lib/libpciaccess/commit/?id=a798395a1bfd9d06d40e2d8d14377a156c94429a | ||
5 | It would appear in the next .tar.bz2 release. | ||
6 | |||
7 | ------------------------------ | ||
8 | |||
9 | commit a798395a1bfd9d06d40e2d8d14377a156c94429a | ||
10 | Author: Daniel Drake <dsd@laptop.org> | ||
11 | Date: 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 | |||
29 | diff --git a/src/common_io.c b/src/common_io.c | ||
30 | index 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 | ||
6 | require xorg-lib-common.inc | 6 | require xorg-lib-common.inc |
7 | 7 | ||
8 | SRC_URI += "file://fix_deletion_of_last_handle.patch" | ||
9 | |||
8 | LICENSE = "MIT & MIT-style" | 10 | LICENSE = "MIT & MIT-style" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=2c765efe1e0722c1badff5e54429b102" | 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=de01cb89a769dc657d4c321c209ce4fc" |
10 | 12 | ||
11 | PR = "r0" | 13 | PR = "r0" |
12 | 14 | ||
13 | DEPENDS += "xproto virtual/libx11" | 15 | DEPENDS += "xproto virtual/libx11" |
14 | 16 | ||
15 | SRC_URI[md5sum] = "d6363ee9f4df79f6fc47cba7c67b0d35" | 17 | SRC_URI[md5sum] = "f1db198398a8a1143822acc230843e8c" |
16 | SRC_URI[sha256sum] = "cc47d7f0e48cf4eed972916b536fdc97788d7521915e3ae1cc92d540776d7344" | 18 | SRC_URI[sha256sum] = "0861d5bf68b598baa307e5c9b06dfd38ae03096b46e36b236106517bcd14b63a" |