aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmin Hassani <ahassani@chromium.org>2019-03-29 15:50:49 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-03-29 15:50:49 -0700
commit15d352377b39bba76d47d8c038bcaf38dfc2216c (patch)
tree752e8abb4031b24d3656e3fec6469439d6c17671
parent09666050faf37461eb9f1271c5f00fde981bbd63 (diff)
parentd8e8ba4d7b0a5360321afa94638cd82cf1d316ca (diff)
downloadbzip2-15d352377b39bba76d47d8c038bcaf38dfc2216c.tar.gz
Merge "Check for upper bounds of nselectors."android-o-mr1-iot-release-1.0.14android-o-mr1-iot-release-1.0.13
am: d8e8ba4d7b Change-Id: Ie5b372f0617f3a9a7deba3ba36c86df295db3ff6
-rw-r--r--decompress.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/decompress.c b/decompress.c
index 311f566..391552d 100644
--- a/decompress.c
+++ b/decompress.c
@@ -288,6 +288,7 @@ Int32 BZ2_decompress ( DState* s )
if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
+ if (nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
for (i = 0; i < nSelectors; i++) {
j = 0;
while (True) {