aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAws Ismail <aws.ismail@windriver.com>2012-07-06 16:53:40 -0400
committerSaul Wold <sgw@linux.intel.com>2012-07-10 11:13:35 -0700
commitde9979aefbc56af59b4d236a4b63dd19dcdcfb53 (patch)
treea30972754585658b5c1bd6a6dd899d12f203cef8
parent84764337a584002a92940323d374b0e417c573a6 (diff)
downloadpsplash-de9979aefbc56af59b4d236a4b63dd19dcdcfb53.tar.gz
psplash-de9979aefbc56af59b4d236a4b63dd19dcdcfb53.tar.bz2
psplash-de9979aefbc56af59b4d236a4b63dd19dcdcfb53.zip
Fix for psplash segmentation fault
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@windriver.com> -----------------------------------------------------------------
-rw-r--r--psplash.c2
1 files changed, 1 insertions, 1 deletions
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;
}