Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert malicious commits #95

Closed
wants to merge 11 commits into from
4 changes: 2 additions & 2 deletions src/liblzma/check/crc32_fast.c
Expand Up @@ -135,12 +135,12 @@ typedef uint32_t (*crc32_func_type)(
// This resolver is shared between all three dispatch methods. It serves as
// the ifunc resolver if ifunc is supported, otherwise it is called as a
// regular function by the constructor or first call resolution methods.
// The function attributes are needed for safe IFUNC resolver usage with GCC.
// The funcion attributes are needed for safe IFUNC resolver usage with GCC.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this pr just reverts changes lol, including 8c9b8b2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was easier to revert the entire commit than only revert parts of it.

That entire line is removed in a subsequent commit (1efea8d), so the end result is the same.

lzma_resolver_attributes
static crc32_func_type
crc32_resolve(void)
{
return is_arch_extension_supported()
return is_arch_extension_supported()
? &crc32_arch_optimized : &crc32_generic;
}

Expand Down
3 changes: 2 additions & 1 deletion src/liblzma/check/crc64_fast.c
Expand Up @@ -98,11 +98,12 @@ typedef uint64_t (*crc64_func_type)(
# pragma GCC diagnostic ignored "-Wunused-function"
#endif

// The funcion attributes are needed for safe IFUNC resolver usage with GCC.
lzma_resolver_attributes
static crc64_func_type
crc64_resolve(void)
{
return is_arch_extension_supported()
return is_arch_extension_supported()
? &crc64_arch_optimized : &crc64_generic;
}

Expand Down
19 changes: 0 additions & 19 deletions tests/files/README
Expand Up @@ -41,8 +41,6 @@
good-0catpad-empty.xz has two zero-Block Streams concatenated with
four-byte Stream Padding between the Streams.

good-2cat.xz has two Streams with one Block each.

good-1-check-none.xz has one Stream with one Block with two
uncompressed LZMA2 chunks and no integrity check.

Expand Down Expand Up @@ -294,11 +292,6 @@
Uncompressed Size bytes of output will have been produced but
the LZMA2 decoder doesn't indicate end of stream.

bad-3-corrupt_lzma2.xz has three Streams in it. The first and third
streams are valid xz Streams. The middle Stream has a correct Stream
Header, Block Header, Index and Stream Footer. Only the LZMA2 data
is corrupt. This file should decompress if --single-stream is used.


3. Descriptions of Individual .lzma Files

Expand All @@ -315,14 +308,6 @@
will give an error at the end of the file after producing the
correct uncompressed output.

good-small_compressed.lzma was created with a small dictionary (2^16).
It contains the string "Hello World" repeated 100,000 times. This tests
match decoding and wrapping the dictionary.

good-large_compressed.lzma was created with a mix of repeated
characters and random data to test a data stream containing many
matches and many literals.


3.2. Bad Files

Expand All @@ -344,10 +329,6 @@
bad-too_small_size-without_eopm-3.lzma is like -1 above but instead
of a literal the problem occurs in the middle of a match.

bad-dict_size.lzma has a valid dictionary size according to the .lzma
File Format, but will be rejected by XZ Utils because it is not 2^n or
2^n + 2^(n-1).


4. Descriptions of Individual .lz (lzip) Files

Expand Down
Binary file removed tests/files/bad-3-corrupt_lzma2.xz
Binary file not shown.
Binary file removed tests/files/bad-dict_size.lzma
Binary file not shown.
Binary file removed tests/files/good-2cat.xz
Binary file not shown.
Binary file removed tests/files/good-large_compressed.lzma
Binary file not shown.
Binary file removed tests/files/good-small_compressed.lzma
Binary file not shown.