Skip to content

Commit bbd2d90

Browse files
libwma: fix crash caused by missing bounds check in decode_exp_vlc
1 parent 676b879 commit bbd2d90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/wma/libwma/wmadeci.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,10 @@ static int decode_exp_vlc(WMADecodeContext *s, int ch)
790790
/* NOTE: this offset is the same as MPEG4 AAC ! */
791791
last_exp += code - 60;
792792

793+
if (last_exp > 68) {
794+
return -1;
795+
}
796+
793797
v = pow_10_to_yover16_ptr[last_exp];
794798
if (v > max_scale)
795799
{

0 commit comments

Comments
 (0)