summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2012-12-23 05:52:27 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-03 12:34:23 (GMT)
commit01c1421270ae0c14a6547d7025137d36f3e98b0e (patch)
treed5a498dfd812fb78b3cd8bcaf8b5edb82319abda
parent2ccb03f9b71db3bace4e60fafafcc2c80bd8b48f (diff)
downloadpoky-01c1421270ae0c14a6547d7025137d36f3e98b0e.tar.gz
psplash: new patch to fix segfault
This fixes a segmentation fault when passing -a without an argument. Fixes [YOCTO #2903] (From OE-Core rev: f5b8ba5e51ac41cf375119a88083617f667a85d5) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch22
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb3
2 files changed, 24 insertions, 1 deletions
diff --git a/meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch b/meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch
new file mode 100644
index 0000000..f69c8a2
--- /dev/null
+++ b/meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch
@@ -0,0 +1,22 @@
1Fix segmentation fault when passing -a without angle value.
2
3When psplash -a is called instead of psplash -a<angle value>, it will
4cause a segmentation fault by calling an out of bound argv[].
5
6Upstream-Status: Accepted
7Needed for denzil since we're not upgrading the recipe.
8
9Signed-off-by: Scott Garman <scott.a.garman@intel.com>
10
11diff -urN git.orig/psplash.c git/psplash.c
12--- git.orig/psplash.c 2012-12-22 21:28:05.830631789 -0800
13+++ git/psplash.c 2012-12-22 21:29:54.962633330 -0800
14@@ -219,7 +219,7 @@
15
16 if (!strcmp(argv[i],"-a") || !strcmp(argv[i],"--angle"))
17 {
18- if (++i > argc) goto fail;
19+ if (++i >= argc) goto fail;
20 angle = atoi(argv[i]);
21 continue;
22 }
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index f93afea..56a953b 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -7,10 +7,11 @@ LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85b
7 7
8SRCREV = "e05374aae945bcfc6d962ed0d7b2774b77987e1d" 8SRCREV = "e05374aae945bcfc6d962ed0d7b2774b77987e1d"
9PV = "0.1+git${SRCPV}" 9PV = "0.1+git${SRCPV}"
10PR = "r2" 10PR = "r3"
11 11
12SRC_URI = "git://git.yoctoproject.org/${BPN};protocol=git \ 12SRC_URI = "git://git.yoctoproject.org/${BPN};protocol=git \
13 file://psplash-init \ 13 file://psplash-init \
14 file://psplash_fix_bad_arg_segfault.patch \
14 ${SPLASH_IMAGES}" 15 ${SPLASH_IMAGES}"
15 16
16SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default" 17SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"