diff options
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 @@ | |||
1 | Fix segmentation fault when passing -a without angle value. | ||
2 | |||
3 | When psplash -a is called instead of psplash -a<angle value>, it will | ||
4 | cause a segmentation fault by calling an out of bound argv[]. | ||
5 | |||
6 | Upstream-Status: Accepted | ||
7 | Needed for denzil since we're not upgrading the recipe. | ||
8 | |||
9 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
10 | |||
11 | diff -urN git.orig/psplash.c git/psplash.c | ||
12 | --- git.orig/psplash.c 2012-12-22 21:28:05.830631789 -0800 | ||
13 | +++ git/psplash.c 2012-12-22 21:29:54.962633330 -0800 | ||
14 | @@ -219,7 +219,7 @@ | ||
15 | |||
16 | if (!strcmp(argv[i],"-a") || !strcmp(argv[i],"--angle")) | ||
17 | { | ||
18 | - if (++i > argc) goto fail; | ||
19 | + if (++i >= argc) goto fail; | ||
20 | angle = atoi(argv[i]); | ||
21 | continue; | ||
22 | } | ||