Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: sysupgrade/ftp: use a 'needle' to poke through caching layers
To:
Job Snijders <job@openbsd.org>
Cc:
tech@openbsd.org
Date:
Thu, 02 May 2024 16:26:59 +0200

Download raw body.

Thread
On Thu, 02 May 2024 15:59:19 +0200,
Job Snijders <job@openbsd.org> wrote:
> 
> --- usr.bin/ftp/util.c	8 Mar 2023 04:43:11 -0000	1.98
> +++ usr.bin/ftp/util.c	2 May 2024 13:30:20 -0000
> @@ -786,6 +786,8 @@ progressmeter(int flag, const char *file
>  			free(title);
>  			title = strdup(filename);
>  		}
> +		if (clipqs)
> +			title[strcspn(title, "?")] = '\0';
>  		free(filenamebuf);
>  	}
>  
> 

title might be NULL here that will lead to a crash.

-- 
wbr, Kirill