MTD: slc-nand: fix signed integer overflow in erase_bootloader [1/1]
authorxianjun.liu <xianjun.liu@amlogic.com>
Tue, 23 Jul 2019 03:14:19 +0000 (11:14 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Fri, 26 Jul 2019 05:33:06 +0000 (22:33 -0700)
commit42fb43b491edbe3a418f2aadceb618a94e6a41f9
tree8efe1c54fc184ecc9eadfdc8e005ef7bb86d0edb
parent982cb0f9a192f6ab7c825a4809e995f8399cebb8
MTD: slc-nand: fix signed integer overflow in erase_bootloader [1/1]

PD#SWPL-11771

Problem:
Hackers can use signed integer erase_boot_num to cause systems crash

Solution:
replace signed variable with unsigned variables

Verify:
AXG-S400

Change-Id: I9cc8d8f43c199f48e7d7bff2664bca740681d274
Signed-off-by: xianjun.liu <xianjun.liu@amlogic.com>
drivers/amlogic/mtd/boot.c