Subject: Re: [PATCH] json_print: Add explicit condition in print_color_string()

From: Stephen Hemminger <[email-masked]>
Date: Wed, 14 Feb 2024 19:00:10 -0800

On Tue, 13 Feb 2024 23:40:09 +0300
Maks Mishin <[email-masked]> wrote:

> Added explicit condition for check `key` and `value`
> in print_color_string() to avoid call `jsonw_string_field`
> with key=NULL and value=NULL.
> 
> Signed-off-by: Maks Mishin <[email-masked]>

Thanks for the patch, but looks like another potential issue
found by a checker. Anything calling print_color_string and wanting
to print a json string with key and value of NULL is broken.
This change would paper over a real bug.

Do you have a test case where this occurs?