[yocto] [PATCH] Fix for psplash segmentation fault
Aws Ismail
aws.ismail at windriver.com
Fri Jul 6 13:53:40 PDT 2012
Fix segmentation fault when passing -a without angel value.
When psplash -a is called instead of psplash -a<angle value>
it will segmentation fault calling out of bound argv[].
git://git.yoctoproject.org/psplash
Signed-of-by: Aws Ismail<aws.ismail at windriver.com>
-----------------------------------------------------------------
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;
}
More information about the yocto
mailing list