summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902
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 /meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902
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>
Diffstat (limited to 'meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902')
-rw-r--r--meta/recipes-graphics/xorg-lib/libpciaccess-0.12.902/fix_deletion_of_last_handle.patch51
1 files changed, 51 insertions, 0 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