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 diff --git a/meta/recipes-core/psplash/files/psplash-fix-angle-argv-segfault.patch b/meta/recipes-core/psplash/files/psplash-fix-angle-argv-s new file mode 100644 index 0000000..797fe48 --- /dev/null +++ b/meta/recipes-core/psplash/files/psplash-fix-angle-argv-segfault.patch @@ -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 + +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; + } diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 0d88a60..06f8a9c 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb @@ -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"