From 13898fa7a91155a60c4c0bd61d4b7693a2ff3f09 Mon Sep 17 00:00:00 2001 From: Elie Le Vaillant Date: Tue, 5 Mar 2024 21:20:57 +0100 Subject: [PATCH] tar: chktar: fix conditional typo --- tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tar.c b/tar.c index 5f73c26..7529997 100644 --- a/tar.c +++ b/tar.c @@ -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'; -- 2.45.2