diff options
author | Scott Garman <scott.a.garman@intel.com> | 2012-12-22 21:52:27 -0800 |
---|---|---|
committer | Scott Garman <scott.a.garman@intel.com> | 2012-12-22 21:52:27 -0800 |
commit | f5b8ba5e51ac41cf375119a88083617f667a85d5 (patch) | |
tree | 962574d1dc28d172908fa77b191f83b0fc264933 /meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch | |
parent | c806466c8d4a9d0d4a66d34d3565d5879c2f2b0f (diff) | |
download | openembedded-core-f5b8ba5e51ac41cf375119a88083617f667a85d5.tar.gz openembedded-core-f5b8ba5e51ac41cf375119a88083617f667a85d5.tar.bz2 openembedded-core-f5b8ba5e51ac41cf375119a88083617f667a85d5.zip |
psplash: new patch to fix segfault
This fixes a segmentation fault when passing -a without
an argument.
Fixes [YOCTO #2903]
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch')
-rw-r--r-- | meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch b/meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch new file mode 100644 index 0000000000..f69c8a2d5e --- /dev/null +++ b/meta/recipes-core/psplash/files/psplash_fix_bad_arg_segfault.patch @@ -0,0 +1,22 @@ +Fix segmentation fault when passing -a without angle value. + +When psplash -a is called instead of psplash -a<angle value>, it will +cause a segmentation fault by calling an out of bound argv[]. + +Upstream-Status: Accepted +Needed for denzil since we're not upgrading the recipe. + +Signed-off-by: Scott Garman <scott.a.garman@intel.com> + +diff -urN git.orig/psplash.c git/psplash.c +--- git.orig/psplash.c 2012-12-22 21:28:05.830631789 -0800 ++++ git/psplash.c 2012-12-22 21:29:54.962633330 -0800 +@@ -219,7 +219,7 @@ + + if (!strcmp(argv[i],"-a") || !strcmp(argv[i],"--angle")) + { +- if (++i > argc) goto fail; ++ if (++i >= argc) goto fail; + angle = atoi(argv[i]); + continue; + } |