diff options
author | Rob Landley <rob@landley.net> | 2022-12-26 12:02:05 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2022-12-26 12:02:05 -0600 |
commit | 50ed76deb2c88d37e506c2bca11556899b6c69df (patch) | |
tree | cf63e6be6af104611c02332b943b8e3176ae1918 /toys/posix/tar.c | |
parent | 2a8ff58ce0cc2f1bb0bac223824fa101e6aaebd7 (diff) | |
download | toybox-50ed76deb2c88d37e506c2bca11556899b6c69df.tar.gz |
Placate ASAN by replacing memcmp() with xmemcmp().
Diffstat (limited to 'toys/posix/tar.c')
-rw-r--r-- | toys/posix/tar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/tar.c b/toys/posix/tar.c index 6f080689..aef1397b 100644 --- a/toys/posix/tar.c +++ b/toys/posix/tar.c @@ -990,7 +990,7 @@ void tar_main(void) if (len!=512 || !is_tar_header(hdr)) { // detect gzip and bzip signatures if (SWAP_BE16(*(short *)hdr)==0x1f8b) toys.optflags |= FLAG_z; - else if (!memcmp(hdr, "BZh", 3)) toys.optflags |= FLAG_j; + else if (!xmemcmp(hdr, "BZh", 3)) toys.optflags |= FLAG_j; else if (peek_be(hdr, 7) == 0xfd377a585a0000UL) toys.optflags |= FLAG_J; else error_exit("Not tar"); |