diff options
| -rw-r--r-- | meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch | 42 | ||||
| -rw-r--r-- | meta/recipes-sato/puzzles/puzzles_git.bb | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch b/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch new file mode 100644 index 0000000000..a02d8732ab --- /dev/null +++ b/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 3d78d4cffcdc1242892b6c21c26d1c96938c48d1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 27 Feb 2021 10:02:43 -0800 | ||
| 4 | Subject: [PATCH] map: Fix stringop-overflow warning | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | |||
| 8 | ../git/map.c: In function 'new_game_desc': | ||
| 9 | ../git/map.c:1663:23: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] | ||
| 10 | 1663 | ret[retlen++] = ','; | ||
| 11 | | ~~~~~~~~~~~~~~^~~~~ | ||
| 12 | ../git/./map.c: In function 'new_game_desc': | ||
| 13 | ../git/./map.c:1663:23: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] | ||
| 14 | 1663 | ret[retlen++] = ','; | ||
| 15 | | ~~~~~~~~~~~~~~^~~~~ | ||
| 16 | |||
| 17 | Upstream-Status: Pending | ||
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 19 | --- | ||
| 20 | map.c | 6 ++++-- | ||
| 21 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/map.c b/map.c | ||
| 24 | index 412305c..fa0c493 100644 | ||
| 25 | --- a/map.c | ||
| 26 | +++ b/map.c | ||
| 27 | @@ -1659,8 +1659,10 @@ static char *new_game_desc(const game_params *params, random_state *rs, | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | - ret[retlen++] = 'a'-1 + run; | ||
| 32 | - ret[retlen++] = ','; | ||
| 33 | + if(ret != NULL) { | ||
| 34 | + ret[retlen++] = 'a'-1 + run; | ||
| 35 | + ret[retlen++] = ','; | ||
| 36 | + } | ||
| 37 | |||
| 38 | run = 0; | ||
| 39 | for (i = 0; i < n; i++) { | ||
| 40 | -- | ||
| 41 | 2.30.1 | ||
| 42 | |||
diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb index 5b65cf8655..ecc2b9844d 100644 --- a/meta/recipes-sato/puzzles/puzzles_git.bb +++ b/meta/recipes-sato/puzzles/puzzles_git.bb | |||
| @@ -15,6 +15,7 @@ SRC_URI = "git://git.tartarus.org/simon/puzzles.git \ | |||
| 15 | file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \ | 15 | file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \ |
| 16 | file://fix-ki-uninitialized.patch \ | 16 | file://fix-ki-uninitialized.patch \ |
| 17 | file://0001-malloc-Check-for-excessive-values-to-malloc.patch \ | 17 | file://0001-malloc-Check-for-excessive-values-to-malloc.patch \ |
| 18 | file://0001-map-Fix-stringop-overflow-warning.patch \ | ||
| 18 | " | 19 | " |
| 19 | 20 | ||
| 20 | UPSTREAM_CHECK_COMMITS = "1" | 21 | UPSTREAM_CHECK_COMMITS = "1" |
