mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix parsing of error-code
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@285 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
3385930e6c
commit
6995742be0
1 changed files with 2 additions and 2 deletions
|
|
@ -177,7 +177,7 @@ stunParseAtrChangeRequest( char* body, unsigned int hdrLen, StunAtrChangeReques
|
|||
static bool_t
|
||||
stunParseAtrError( char* body, unsigned int hdrLen, StunAtrError *result )
|
||||
{
|
||||
if ( hdrLen >= sizeof(StunAtrError) )
|
||||
if ( hdrLen < 4 || hdrLen >= 128+4)
|
||||
{
|
||||
ortp_error("stun: Incorrect size for SA_ERRORCODE");
|
||||
return FALSE;
|
||||
|
|
@ -845,7 +845,7 @@ static char*
|
|||
encodeAtrError(char* ptr, const StunAtrError *atr)
|
||||
{
|
||||
ptr = encode16(ptr, SA_ERRORCODE);
|
||||
ptr = encode16(ptr, 6 + atr->sizeReason);
|
||||
ptr = encode16(ptr, 4 + atr->sizeReason);
|
||||
ptr = encode16(ptr, atr->pad);
|
||||
*ptr++ = atr->errorClass;
|
||||
*ptr++ = atr->number;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue