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

2020-08-12 Thread Andy Shevchenko
On Wed, Aug 12, 2020 at 11:54:02AM +0900, Seungil Kang wrote: Thanks for the patch, my comments below. > When args = "\"\0", "i" will be 0 and args[i-1] is used (line:238) Can you be less ambiguous with the args value? (Perhaps provide a hexdump of it for better understanding) > Because of "i"

[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(+), 1 deletion(-) diff --git a/lib/cmdlin