Introduction
Introduction Statistics Contact Development Disclaimer Help
tar: chktar: fix conditional typo - sbase - suckless unix tools
git clone git://git.suckless.org/sbase
Log
Files
Refs
README
LICENSE
---
commit 13898fa7a91155a60c4c0bd61d4b7693a2ff3f09
parent bca3fcca91cfb6ee64434776aa20209547816c17
Author: Elie Le Vaillant <[email protected]>
Date: Tue, 5 Mar 2024 21:20:57 +0100
tar: chktar: fix conditional typo
Diffstat:
M tar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git 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';
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.