Re: [hackers] [sbase][PATCH] tar: chktar: fix conditional typo

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Wed, 6 Mar 2024 16:01:10 +0100

Hi,


On Tue, Mar 05, 2024 at 09:20:57PM +0100, Elie Le Vaillant wrote:
> ---
> tar.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tar.c b/tar.c
> index 0361b63..405b8d9 100644
> --- a/tar.c
> +++ b/tar.c
> _AT_@ -423,7 +423,7 @@ chktar(struct header *h)
> goto bad;
> }
> memcpy(tmp, h->chksum, sizeof(tmp));
> - for (i = 0; i < sizeof(tmp), tmp[i] == ' '; i++);
> + for (i = 0; i < sizeof(tmp) && tmp[i] == ' '; i++);
> for (; i < sizeof(tmp); i++)
> if (tmp[i] == ' ')
> tmp[i] = '\0';

Applied, thanks.
Received on Wed Mar 06 2024 - 16:01:10 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 06 2024 - 16:12:37 CET