Index: source/lobby/IXmppClient.h =================================================================== --- source/lobby/IXmppClient.h +++ source/lobby/IXmppClient.h @@ -22,7 +22,7 @@ class ScriptInterface; namespace StunClient { -class StunEndpoint; + struct StunEndpoint; } class IXmppClient Index: source/network/StunClient.cpp =================================================================== --- source/network/StunClient.cpp +++ 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;