cmd: i2c: fix coverity issue
PATCH 1/1 cmd: i2c: fix coverity issue
coverity scan reported issue:
** CID 583415: Integer handling issues (INTEGER_OVERFLOW)
/cmd/i2c.c: 369 in do_i2c_write()
change the length variable into type int.
Signed-off-by Heiko Schocher <[email protected]>
---
azure build:
https://dev.azure.com/hs0298/hs/_build/results?buildId=183&view=results
cmd/i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
cmd/i2c.c +2 -1
@@ -299,7 +299,8 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) {uint chip; -uint devaddr, length; +uint devaddr; +int length;int alen;u_char *memaddr;int ret;
Signature · 4 lines
2.20.1 base-commit: ae5711f881100f856ead1e76832c32b92dba93c7 branch: i2c-coverity-issue-v1