tzdata: update bbappend for 2013i
[opendreambox.git] / meta-opendreambox / recipes-devtools / opkg / opkg / 0004-pkg_hash_fetch_conflicts-fix-possible-segfaults.patch
1 From 5c9b0af051da35127a9020db7e4beb97547d53f7 Mon Sep 17 00:00:00 2001
2 From: Andreas Oberritter <obi@opendreambox.org>
3 Date: Thu, 17 May 2012 01:15:15 +0200
4 Subject: [PATCH 04/19] pkg_hash_fetch_conflicts: fix possible segfaults
5 To: opkg-devel@googlegroups.com
6 Cc: paul@paulbarker.me.uk
7
8 Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
9 ---
10  libopkg/pkg_depends.c | 8 ++++++--
11  1 file changed, 6 insertions(+), 2 deletions(-)
12
13 diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
14 index 8291c68..cd9d2c8 100644
15 --- a/libopkg/pkg_depends.c
16 +++ b/libopkg/pkg_depends.c
17 @@ -403,10 +403,14 @@ pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg)
18         /* foreach possible satisfier */
19         for(j = 0; j < conflicts->possibility_count; j++){
20              possible_satisfier = possible_satisfiers[j];
21 -            if (!possible_satisfier)
22 +            if (!possible_satisfier) {
23                  opkg_msg(ERROR, "Internal error: possible_satisfier=NULL\n");
24 -            if (!possible_satisfier->pkg)
25 +                continue;
26 +            }
27 +            if (!possible_satisfier->pkg) {
28                  opkg_msg(ERROR, "Internal error: possible_satisfier->pkg=NULL\n");
29 +                continue;
30 +            }
31             test_vec = possible_satisfier->pkg->pkgs;
32             if (test_vec) {
33                  /* pkg_vec found, it is an actual package conflict
34 -- 
35 1.9.1
36