All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix for psplash segmentation fault
@ 2012-07-17 16:37 Aws Ismail
  0 siblings, 0 replies; 6+ messages in thread
From: Aws Ismail @ 2012-07-17 16:37 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1811 bytes --]

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 <aws.ismail@windriver.com>

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 <aws.ismail@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;
+       }
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"


[-- Attachment #2: Type: text/html, Size: 3972 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] Fix for psplash segmentation fault
@ 2012-07-17 16:04 Aws Ismail
  0 siblings, 0 replies; 6+ messages in thread
From: Aws Ismail @ 2012-07-17 16:04 UTC (permalink / raw)
  To: oe-core list

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 <aws.ismail@windriver.com>

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 <aws.ismail@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;
+       }
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"




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix for psplash segmentation fault
  2012-07-06 20:53 Aws Ismail
  2012-07-06 20:54 ` Aws Ismail
  2012-07-09 19:49 ` Aws Ismail
@ 2012-07-16 16:32 ` Saul Wold
  2 siblings, 0 replies; 6+ messages in thread
From: Saul Wold @ 2012-07-16 16:32 UTC (permalink / raw)
  To: aws.ismail; +Cc: yocto

On 07/06/2012 01:53 PM, Aws Ismail wrote:
> 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>
>
> -----------------------------------------------------------------
>
> 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;
>          }
>
Merged into psplash upstream, if you would like to send a patch to 
Openembedded-Core updating the psplash recipe that would be welcome also.

Thanks
	Sau!

> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix for psplash segmentation fault
  2012-07-06 20:53 Aws Ismail
  2012-07-06 20:54 ` Aws Ismail
@ 2012-07-09 19:49 ` Aws Ismail
  2012-07-16 16:32 ` Saul Wold
  2 siblings, 0 replies; 6+ messages in thread
From: Aws Ismail @ 2012-07-09 19:49 UTC (permalink / raw)
  To: yocto

Hi all,

This is a follow-up on the fix I sent recently for psplash. I'd
appreciate any comments.

Thanks

Aws Ismail

====================================================================
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

Signed-off-by: Aws Ismail <aws.ismail@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;
         }



On 07/06/2012 04:53 PM, Aws Ismail wrote:
> Fix segmentation fault when passing -a without angle 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>
>
> -----------------------------------------------------------------
>
> 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;
>         }
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix for psplash segmentation fault
  2012-07-06 20:53 Aws Ismail
@ 2012-07-06 20:54 ` Aws Ismail
  2012-07-09 19:49 ` Aws Ismail
  2012-07-16 16:32 ` Saul Wold
  2 siblings, 0 replies; 6+ messages in thread
From: Aws Ismail @ 2012-07-06 20:54 UTC (permalink / raw)
  To: aws.ismail; +Cc: yocto

s/angel/angle :)

Aws\

On 07/06/2012 04:53 PM, Aws Ismail wrote:
> 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>
>
> -----------------------------------------------------------------
>
> 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;
>         }
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


-- 
-----------
Aws Ismail
-----------



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Fix for psplash segmentation fault
@ 2012-07-06 20:53 Aws Ismail
  2012-07-06 20:54 ` Aws Ismail
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Aws Ismail @ 2012-07-06 20:53 UTC (permalink / raw)
  To: yocto

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>

-----------------------------------------------------------------

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;
         }



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-17 19:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 16:37 [PATCH] Fix for psplash segmentation fault Aws Ismail
  -- strict thread matches above, loose matches on Subject: below --
2012-07-17 16:04 Aws Ismail
2012-07-06 20:53 Aws Ismail
2012-07-06 20:54 ` Aws Ismail
2012-07-09 19:49 ` Aws Ismail
2012-07-16 16:32 ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.