Index: ps/trunk/source/lobby/IXmppClient.h =================================================================== --- ps/trunk/source/lobby/IXmppClient.h +++ ps/trunk/source/lobby/IXmppClient.h @@ -22,7 +22,7 @@ class ScriptInterface; namespace StunClient { -class StunEndpoint; + struct StunEndpoint; } class IXmppClient Index: ps/trunk/source/network/StunClient.cpp =================================================================== --- ps/trunk/source/network/StunClient.cpp +++ ps/trunk/source/network/StunClient.cpp @@ -115,7 +115,10 @@ offset += n; while (a--) { - result <<= 8; + // Prevent shift count overflow if the type is u8 + if (n > 1) + result <<= 8; + result += buffer[offset - 1 - a]; } return true;