]> git.baikalelectronics.ru Git - uboot.git/commit
imx: hab: Fix coverity issue in HAB event decoding
authorYe Li <ye.li@nxp.com>
Thu, 15 Jun 2023 10:09:15 +0000 (18:09 +0800)
committerStefano Babic <sbabic@denx.de>
Thu, 13 Jul 2023 09:29:40 +0000 (11:29 +0200)
commit9171f54f1d02042787979b92e01f6db11fe8f267
tree7076ade966730477d6c3b89a1b90924f518f79f7
parent61e633997cad36c7ba976473f13ddc5ea82345dd
imx: hab: Fix coverity issue in HAB event decoding

Fix below coverity issues caused by get_idx function where "-1" is
compared with uint8_t "element"
343336 Unsigned compared with neg
343337 Operands don't affect result

Additional, this function returns "-1" will cause overflow to
event string array.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/hab.c