Re: [PATCH] common: fix: add NULL checks for xrealloc in make_string

2025-02-11 Thread Tom Rini
On Fri, 07 Feb 2025 01:01:23 +0300, Anton Moryakov wrote: > - Check return value of xrealloc for NULL. > - Free allocated memory and return NULL if xrealloc fails. > - Prevent NULL pointer dereference in strlen and strcat. > > Triggers found by static analyzer Svace. > > > [...] Applied to u-b

[PATCH] common: fix: add NULL checks for xrealloc in make_string

2025-02-06 Thread Anton Moryakov
- Check return value of xrealloc for NULL. - Free allocated memory and return NULL if xrealloc fails. - Prevent NULL pointer dereference in strlen and strcat. Triggers found by static analyzer Svace. Signed-off-by: Anton Moryakov --- common/cli_hush.c | 8 +++- 1 file changed, 7 insertions