summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Kumar P <naveenkumar.p@ittiam.com>2018-01-19 14:13:55 +0530
committerJP Sugarbroad <jpsugar@google.com>2018-02-13 14:33:20 -0800
commitf3dce5acabb980020a5e8dd447cbbed6b14553c5 (patch)
treec1e3211db85c6ea1f57035a85672a07bdff40483
parent617fb339671999c4ba69b4024c346bdbaabb09ec (diff)
downloadandroid_external_libhevc-f3dce5acabb980020a5e8dd447cbbed6b14553c5.tar.gz
android_external_libhevc-f3dce5acabb980020a5e8dd447cbbed6b14553c5.tar.bz2
android_external_libhevc-f3dce5acabb980020a5e8dd447cbbed6b14553c5.zip
Check limits for log2_max_pic_order_cnt_lsb_minus4 in sps
Bug: 71766721 According to the spec, the value of log2_max_pic_order_cnt_lsb_minus4 shall be in the range of 0 to 12, inclusive. Change-Id: Ibd199b6dea246c2fac6214c21e49f27d95c07659 (cherry picked from commit 4d32ff55cf3eeeb3a319517176ed2a2c6c376fe1)
-rw-r--r--decoder/ihevcd_parse_headers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/decoder/ihevcd_parse_headers.c b/decoder/ihevcd_parse_headers.c
index a8daa3c..b8ed252 100644
--- a/decoder/ihevcd_parse_headers.c
+++ b/decoder/ihevcd_parse_headers.c
@@ -1402,6 +1402,8 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
return IHEVCD_UNSUPPORTED_BIT_DEPTH;
UEV_PARSE("log2_max_pic_order_cnt_lsb_minus4", value, ps_bitstrm);
+ if(value < 0 || value > 12)
+ return IHEVCD_INVALID_PARAMETER;
ps_sps->i1_log2_max_pic_order_cnt_lsb = value + 4;
BITS_PARSE("sps_sub_layer_ordering_info_present_flag", value, ps_bitstrm, 1);