Fix for psplash segmentation fault
PATCH 1/1 Fix for psplash segmentation fault
Fix psplash segmentation fault
This fixes the segmentation fault when calling:
psplash -a
The -a option requires a rotation angle to be given and if it is missing then the user is shown the correct usage.
Signed-off-by Aws Ismail <[email protected]>
meta/recipes-core/psplash/files/psplash-fix-angle-argv-segfault.patch new file +27 -0
@@ -0,0 +1,27 @@ +Fix psplash segmentation fault + +This fixes the segmentation fault when calling: +psplash -a + +The -a option requires a rotation angle to be given +and if it is missing then the user is shown the correct usage. + +From: git://git.yoctoproject.org/psplash + +Upstream-Status: Submitted + +Signed-off-by: Aws Ismail <[email protected]> + +diff --git a/psplash.c b/psplash.c +index 0158628..09cf0d0 100644 +--- a/psplash.c ++++ b/psplash.c +@@ -219,7 +219,7 @@ main (int argc, char** argv) + + if (!strcmp(argv[i],"-a") || !strcmp(argv[i],"--angle")) + { +- if (++i > argc) goto fail; ++ if (++i >= argc) goto fail; + angle = atoi(argv[i]); + continue; + }
meta/recipes-core/psplash/psplash_git.bb +0 -0
@@ -11,6 +11,7 @@ PR = "r2" SRC_URI = "git://git.yoctoproject.org/${BPN};protocol=git \
file://psplash-init \
+ file://psplash-fix-angle-argv-segfault.patch \
${SPLASH_IMAGES}" SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"