diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-01-12 07:40:50 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 07:40:50 -0300 |
commit | 712fcc850e5a6d0867b0d97a0b79f1addd01998f (patch) | |
tree | d092452bebc70059ffa9f913a1daea74d656300e /lib/xz/xz_dec_stream.c | |
parent | e99f775ed2f46b225106f0a156116a0080d16740 (diff) | |
parent | 0156d956a951c70743d2338132662b29aeb8847d (diff) |
Merge pull request #517 from denisdrozdov/5.4-2.3.x-imx
Merge tag 'v5.4.161' into 5.4-2.3.x-imx
Diffstat (limited to 'lib/xz/xz_dec_stream.c')
-rw-r--r-- | lib/xz/xz_dec_stream.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/xz/xz_dec_stream.c b/lib/xz/xz_dec_stream.c index bd1d182419d7..0b161f90d8d8 100644 --- a/lib/xz/xz_dec_stream.c +++ b/lib/xz/xz_dec_stream.c @@ -402,12 +402,12 @@ static enum xz_ret dec_stream_header(struct xz_dec *s) * we will accept other check types too, but then the check won't * be verified and a warning (XZ_UNSUPPORTED_CHECK) will be given. */ + if (s->temp.buf[HEADER_MAGIC_SIZE + 1] > XZ_CHECK_MAX) + return XZ_OPTIONS_ERROR; + s->check_type = s->temp.buf[HEADER_MAGIC_SIZE + 1]; #ifdef XZ_DEC_ANY_CHECK - if (s->check_type > XZ_CHECK_MAX) - return XZ_OPTIONS_ERROR; - if (s->check_type > XZ_CHECK_CRC32) return XZ_UNSUPPORTED_CHECK; #else |