diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-04-16 10:36:59 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-04-16 10:36:59 +0000 |
commit | 2f481b47abde68a06d4c2991b7ddf108a5f51021 (patch) | |
tree | b9ce6ce1f5f3d0a4936db3b5b87deaa5064e80f3 | |
parent | 7a86a094a50fa98d773e9e90964fac762ac948b3 (diff) | |
parent | 18ac2d928d163d748b77a0257bf51ed259ce9a23 (diff) | |
download | fdk-aac-2f481b47abde68a06d4c2991b7ddf108a5f51021.tar.gz fdk-aac-2f481b47abde68a06d4c2991b7ddf108a5f51021.tar.bz2 fdk-aac-2f481b47abde68a06d4c2991b7ddf108a5f51021.zip |
Merge cherrypicks of [7070078, 7070079, 7070080, 7070608, 7069857, 7069858, 7069859, 7070136, 7070137, 7070138, 7071045, 7071046, 7071047, 7071048, 7070081, 7070863, 7070082, 7069862, 7069863, 7069864, 7071085, 7070118] into pi-qpr3-b-release
Change-Id: I253904631907415999bad3cbcd4259896b8a3844
-rw-r--r-- | libFDK/src/nlc_dec.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libFDK/src/nlc_dec.cpp b/libFDK/src/nlc_dec.cpp index 8a8ccfd..6e98ce0 100644 --- a/libFDK/src/nlc_dec.cpp +++ b/libFDK/src/nlc_dec.cpp @@ -647,6 +647,10 @@ static ERROR_t huff_decode(HANDLE_FDK_BITSTREAM strm, SCHAR* out_data_1, } df_rest_flag_1 = num_val_1_int % 2; if (df_rest_flag_1) num_val_1_int -= 1; + if (num_val_1_int < 0) { + err = HUFFDEC_NOTOK; + goto bail; + } } if (out_data_2 != NULL) { if (diff_type_2 == DIFF_FREQ) { @@ -658,6 +662,10 @@ static ERROR_t huff_decode(HANDLE_FDK_BITSTREAM strm, SCHAR* out_data_1, } df_rest_flag_2 = num_val_2_int % 2; if (df_rest_flag_2) num_val_2_int -= 1; + if (num_val_2_int < 0) { + err = HUFFDEC_NOTOK; + goto bail; + } } if (out_data_1 != NULL) { |