[PATCH v2] lib/cmdline: prevent unintented access to address

2020-08-12 Thread Seungil Kang
When args = "\"\0", "i" will be 0 and args[i-1] is used. (*lib/cmdline.c +238) Because of "i" is an unsigned int type, the function will access at args[0x]. It can make a crash. Signed-off-by: Seungil Kang --- Thanks for your review, my comments belo

[PATCH] lib/cmdline: prevent unintented access to address

2020-08-11 Thread Seungil Kang
When args = "\"\0", "i" will be 0 and args[i-1] is used (line:238) Because of "i" is an unsigned int type, the function will access at args[0x] It can make a crash Signed-off-by: Seungil Kang --- lib/cmdline.c | 2 +- 1 file changed, 1 insertion(