Update patch
This commit is contained in:
parent
3f6ff9b519
commit
30c13ebab3
@ -1,7 +1,7 @@
|
|||||||
From b07b105d1b66e32760095e3602261738443b9e13 Mon Sep 17 00:00:00 2001
|
From 5c93a2ef05285f3e8946aab185c0b44b5abe999f Mon Sep 17 00:00:00 2001
|
||||||
From: Mark Wielaard <mark@klomp.org>
|
From: Andrew Lukoshko <alukoshko@almalinux.org>
|
||||||
Date: Wed, 3 Jul 2019 01:28:11 +0200
|
Date: Fri, 15 Nov 2024 13:54:11 +0000
|
||||||
Subject: [PATCH] Accept as many selectors as the file format allows.
|
Subject: [PATCH] Accept as many selectors as the file format allows
|
||||||
|
|
||||||
But ignore any larger than the theoretical maximum, BZ_MAX_SELECTORS.
|
But ignore any larger than the theoretical maximum, BZ_MAX_SELECTORS.
|
||||||
|
|
||||||
@ -29,13 +29,15 @@ EState struct. But the struct has extra space allocated after the
|
|||||||
selector arrays of 18060 bytes (which is larger than 14766).
|
selector arrays of 18060 bytes (which is larger than 14766).
|
||||||
All of which will be initialized later (so the overwrite of that
|
All of which will be initialized later (so the overwrite of that
|
||||||
space with extra selector values would have been harmless).
|
space with extra selector values would have been harmless).
|
||||||
|
|
||||||
|
Backport of upstream commit b07b105d1b66e32760095e3602261738443b9e13
|
||||||
---
|
---
|
||||||
compress.c | 2 +-
|
compress.c | 2 +-
|
||||||
decompress.c | 10 ++++++++--
|
decompress.c | 10 ++++++++--
|
||||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/compress.c b/compress.c
|
diff --git a/compress.c b/compress.c
|
||||||
index 237620d..76adee6 100644
|
index caf7696..19b662b 100644
|
||||||
--- a/compress.c
|
--- a/compress.c
|
||||||
+++ b/compress.c
|
+++ b/compress.c
|
||||||
@@ -454,7 +454,7 @@ void sendMTFValues ( EState* s )
|
@@ -454,7 +454,7 @@ void sendMTFValues ( EState* s )
|
||||||
@ -48,12 +50,12 @@ index 237620d..76adee6 100644
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/decompress.c b/decompress.c
|
diff --git a/decompress.c b/decompress.c
|
||||||
index 20ce493..3303499 100644
|
index b6e0a29..78060c9 100644
|
||||||
--- a/decompress.c
|
--- a/decompress.c
|
||||||
+++ b/decompress.c
|
+++ b/decompress.c
|
||||||
@@ -287,7 +287,7 @@ Int32 BZ2_decompress ( DState* s )
|
@@ -287,7 +287,7 @@ Int32 BZ2_decompress ( DState* s )
|
||||||
GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
|
GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
|
||||||
if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR);
|
if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
|
||||||
GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
|
GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
|
||||||
- if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
|
- if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
|
||||||
+ if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
|
+ if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
|
||||||
|
Loading…
Reference in New Issue
Block a user