Skip to content

Commit

Permalink
Check for null bytes for Cabinet files
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-vasile committed Dec 12, 2021
1 parent 222d00f commit 40a28fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/magic/archive.go
Expand Up @@ -32,7 +32,7 @@ var (
// Warc matches a Web ARChive file.
Warc = prefix([]byte("WARC/"))
// Cab matches a Cabinet archive file.
Cab = prefix([]byte("MSCF"))
Cab = prefix([]byte("MSCF\x00\x00\x00\x00"))
// Xz matches an xz compressed stream based on https://tukaani.org/xz/xz-file-format.txt.
Xz = prefix([]byte{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00})
// Lzip matches an Lzip compressed file.
Expand Down

0 comments on commit 40a28fc

Please sign in to comment.