Quote:
Originally Posted by netHoxInc
Could be used to crash the server, i think it was nBetNum -1 or smth
|
in the offi v21 leaked version they still did not fix it but anyway I am not sure that would crash the server at 100% but it may lead to a weird behavior of the server.
Problem is in the code below: they use nBetNum before to check the bounds (they do check them in the line after but it must be done at the beginning of the function)
Code:
int CMiniGame::Bet_FiveSystem( FLWSUser* pUser, int nBetNum, int nBetPenya )
{
// ÀÔÂû ¹øÈ£¿¡ ÀÌÀü °ªÀÌ 0À̰í ÇöÀç ÀÔÂû±ÝÀÌ 0À϶§ ¾Æ¹«Àϵµ ¾ÈÇÔ(·Î±× X)
if( pUser->m_nBetFiveSystem[nBetNum] == 0 && nBetPenya == 0 )
return TRUE;
// À߸øµÈ ÀÔÂû ¹øÈ£°¡ µé¾î ¿ÔÀ» ¶§
if( nBetNum < 0 || 5 < nBetNum )
return FIVESYSTEM_FAILED;
// ÀÔÂû±ÝÀº 0º¸´Ù ÀÛÀ» ¼ö ¾ø´Ù.
if(nBetPenya < 0)
return FIVESYSTEM_FAILED;
........