[hackers] [sbase] tar: chktar: fix conditional typo || Elie Le Vaillant
commit 13898fa7a91155a60c4c0bd61d4b7693a2ff3f09
Author: Elie Le Vaillant <eolien55_AT_disroot.org>
AuthorDate: Tue Mar 5 21:20:57 2024 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Mar 6 16:00:10 2024 +0100
tar: chktar: fix conditional typo
diff --git a/tar.c b/tar.c
index 5f73c26..7529997 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';
Received on Wed Mar 06 2024 - 16:00:29 CET
This archive was generated by hypermail 2.3.0
: Wed Mar 06 2024 - 16:00:42 CET