diff options
-rw-r--r-- | recipes-core/swupd-client/swupd-client-2.87/0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch | 34 | ||||
-rw-r--r-- | recipes-core/swupd-client/swupd-client_2.87.bb | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/recipes-core/swupd-client/swupd-client-2.87/0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch b/recipes-core/swupd-client/swupd-client-2.87/0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch new file mode 100644 index 0000000..745d873 --- /dev/null +++ b/recipes-core/swupd-client/swupd-client-2.87/0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch @@ -0,0 +1,34 @@ +From ad26f092f1b2102bf6e298a2a6dd8115f4e88d99 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> +Date: Fri, 15 Apr 2016 18:36:57 +0300 +Subject: [PATCH] manifest.c: Always initialize preserver pointer of file list + +In case a bundle has nothing in common with any other installed +bundle (no files duplicated in different bundles) the preserver +pointer inside deduplicate_files_from_manifest() isn't +initialized which leads to NULL as output of the function. +As result no files of the deleted bundle get deleted at all. + +Upstream-Status: Backported [v3.5.0+] + +Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> +--- + src/manifest.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/manifest.c b/src/manifest.c +index 7c356d7..10b7daa 100644 +--- a/src/manifest.c ++++ b/src/manifest.c +@@ -1326,7 +1326,7 @@ void deduplicate_files_from_manifest(struct manifest **m1, struct manifest *m2) + int count = 0; + + bmanifest = *m1; +- iter1 = list_head(bmanifest->files); ++ iter1 = preserver = list_head(bmanifest->files); + iter2 = list_head(m2->files); + + while (iter1 && iter2) { +-- +2.5.0 + diff --git a/recipes-core/swupd-client/swupd-client_2.87.bb b/recipes-core/swupd-client/swupd-client_2.87.bb index 3690439..39ea5d9 100644 --- a/recipes-core/swupd-client/swupd-client_2.87.bb +++ b/recipes-core/swupd-client/swupd-client_2.87.bb @@ -15,6 +15,7 @@ SRC_URI = "\ file://0001-log.c-avoid-segfault-and-show-staging-file-name.patch \ file://0002-downloads-minimize-syscalls-to-improve-performance.patch \ file://0001-globals.c-Use-fake-address-as-default-updates-url.patch \ + file://0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch \ " SRC_URI[md5sum] = "5d272c62edb8a9c576005ac5e1182ea3" |