ACK: [PATCH] fwts_args: check for null text pointer

Alex Hung alex.hung at canonical.com
Mon Jun 10 20:28:57 UTC 2019


On 2019-06-10 3:52 a.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> The pointer text can potentially be null, so check for this.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/lib/src/fwts_args.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/lib/src/fwts_args.c b/src/lib/src/fwts_args.c
> index 95a2a606..ccdcac51 100644
> --- a/src/lib/src/fwts_args.c
> +++ b/src/lib/src/fwts_args.c
> @@ -274,6 +274,8 @@ static void fwts_args_show_option(
>  
>  	text = fwts_format_text(explanation,
>  		width < 0 ? (FWTS_MIN_TTY_WIDTH - FWTS_ARGS_WIDTH-1) : width);
> +	if (!text)
> +		return;
>  
>  	fwts_list_foreach(item, text) {
>  		printf("%-*.*s %s\n",
> 


Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list