compress.gzip: change the endianness for validation to conform to the gzip file specification (fix #19839) (#19849)

This commit is contained in:
shove 2023-11-12 17:30:05 +08:00 committed by GitHub
parent c494b63d75
commit 14e53f9a75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 50 additions and 9 deletions

View file

@ -123,7 +123,7 @@ fn test_gzip_with_invalid_length() {
uncompressed := 'Hello world!'
mut compressed := compress(uncompressed.bytes())!
compressed[compressed.len - 1] += 1
assert_decompress_error(compressed, 'length verification failed, got 12, expected 13')!
assert_decompress_error(compressed, 'length verification failed, got 12, expected 16777228')!
}
fn test_gzip_with_invalid_flags() {