Re: [PATCH] lib: add NULL pointer check for %s format

2025-05-19 Thread Anton Moryakov
Hi Tom, Thank you for your feedback. You're absolutely right — the subject and commit message were too generic and wordy. I've revised the patch accordingly and sent a v2 with the subject: [PATCH v2] tiny-printf: handle NULL pointer for %s format string The v2 includes: - Updated subject pr

Re: [PATCH] lib: add NULL pointer check for %s format

2025-05-19 Thread Tom Rini
On Fri, May 16, 2025 at 09:54:47PM +0300, ant.v.morya...@gmail.com wrote: > From: Anton Moryakov > > Handle NULL pointer case in string formatting (%s) by printing '(null)' > instead of dereferencing NULL pointer. Makes behavior consistent with > standard printf implementations and prevents pote

[PATCH] lib: add NULL pointer check for %s format

2025-05-16 Thread ant . v . moryakov
From: Anton Moryakov Handle NULL pointer case in string formatting (%s) by printing '(null)' instead of dereferencing NULL pointer. Makes behavior consistent with standard printf implementations and prevents potential crashes. Signed-off-by: Anton Moryakov " --- lib/tiny-printf.c | 2 ++ 1 file