1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From: Khem Raj <raj.khem@gmail.com>
pattern.c: Change string lenght parameter to be size_t in do_row()
This fixes below error on some architectures e.g. RISC-V
pattern.c:455:9: error: 'memset' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 455 | memset(deduced, DOT, (size_t)len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Upstream-Status: Submitted [email discussion with upstream]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
pattern.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: git/pattern.c
===================================================================
--- git.orig/pattern.c
+++ git/pattern.c
@@ -429,7 +429,7 @@ static bool do_row(unsigned char *known,
unsigned char *row,
unsigned char *minpos_done, unsigned char *maxpos_done,
unsigned char *minpos_ok, unsigned char *maxpos_ok,
- unsigned char *start, int len, int step, int *data,
+ unsigned char *start, size_t len, int step, int *data,
unsigned int *changed
#ifdef STANDALONE_SOLVER
, const char *rowcol, int index, int cluewid
|