1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-18 01:33:00 +03:00

Merge PR #701: src/Cedar/Radius: resolve several coverity "issues"

This commit is contained in:
Davide Beatrici 2018-09-14 16:50:20 +02:00 committed by GitHub
commit 9a6b871a0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1577,7 +1577,7 @@ RADIUS_PACKET *ParseRadiusPacket(void *data, UINT size)
goto LABEL_ERROR;
}
if (a.Type == RADIUS_ATTRIBUTE_EAP_MESSAGE && a.DataSize >= 5 && a.DataSize <= 1500)
if (a.Type == RADIUS_ATTRIBUTE_EAP_MESSAGE && a.DataSize >= 5)
{
UINT sz_tmp = Endian16(((EAP_MESSAGE *)a.Data)->Len);
@ -1691,15 +1691,8 @@ RADIUS_PACKET *ParseRadiusPacket(void *data, UINT size)
LABEL_ERROR:
if (p != NULL)
{
FreeRadiusPacket(p);
}
if (buf != NULL)
{
FreeBuf(buf);
}
FreeRadiusPacket(p);
FreeBuf(buf);
return NULL;
}