Skip to content

Commit 4a99c22

Browse files
committed
Hardcode length of hardcoded char array instead of sizeof(long)
sizeof(long) != 8 on 32-bit.
1 parent 9651f5d commit 4a99c22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

genext2fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,7 @@ add2fs_from_tarball(filesystem *fs, uint32 this_nod, FILE * fh, int squash_uids,
22932293
continue;
22942294
} else
22952295
nbnull = 0;
2296-
if (memcmp(tarhead->ustar, "ustar\00000", sizeof(long)) && strcmp(tarhead->ustar, "ustar "))
2296+
if (memcmp(tarhead->ustar, "ustar\00000", 8) && strcmp(tarhead->ustar, "ustar "))
22972297
error_msg_and_die("not a tarball");
22982298
signed_checksum = unsigned_checksum = 0;
22992299
checksum = OCTAL_READ(tarhead->checksum);

0 commit comments

Comments
 (0)