mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00: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;
|
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 = fr->wordpointer[0];
|
||||||
rval <<= 8;
|
rval <<= 8;
|
||||||
rval |= fr->wordpointer[1];
|
rval |= fr->wordpointer[1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user