mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-26 03:39:16 +01:00
engine: common: soundlib: libmpg: backport fix for CVE-2017-12839.
Original patch: https://www.mpg123.de/cgi-bin/scm/mpg123/trunk/src/libmpg123/getbits.h?view=patch&r1=2024&r2=4323
Same as: 8a5e21a2a2
This commit is contained in:
parent
84c14b32ec
commit
ffd5c2d3d0
@ -47,6 +47,10 @@ static uint getbits( mpg123_handle_t *fr, int number_of_bits )
|
||||
{
|
||||
ulong rval;
|
||||
|
||||
if( (long)(fr->wordpointer-fr->bsbuf)*8
|
||||
+ fr->bitindex+number_of_bits > (long)fr->framesize*8 )
|
||||
return 0;
|
||||
|
||||
rval = fr->wordpointer[0];
|
||||
rval <<= 8;
|
||||
rval |= fr->wordpointer[1];
|
||||
|
Loading…
Reference in New Issue
Block a user