larku / RakNet

RakNet is a cross platform, open source, C++ networking engine for game programmers.
Other
60 stars 27 forks source link

Crash while perfoming connect by setting connect atempt count below the NUM_MTU_SIZES #39

Open kaede1003 opened 7 years ago

kaede1003 commented 7 years ago

i found a crash while i am perfoming connect from rakpeer::connect interface by passing the connect atempt count below NUM_MTU_SIZES( <3 )

See rakpeer.cpp at line 5919 int MTUSizeIndex = rcs->requestsMade / (rcs->sendConnectionAttemptCount/NUM_MTU_SIZES); if value of rcs->sendConnectionAttemptCount is below NUM_MTU_SIZES, the divied by zero issue will be occured.

Kiddinglife commented 7 years ago

should be easy to fix it up