mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
src/Cedar/Radius: resolve several coverity "issues"
coverity thinks there might be null pointer dereference, make it happier by removing check (there's a check against NULL in function itself). condition "a.DataSize <= 1500" is always true
This commit is contained in:
parent
ebfde9c97f
commit
4974b2a13e
@ -1577,7 +1577,7 @@ RADIUS_PACKET *ParseRadiusPacket(void *data, UINT size)
|
|||||||
goto LABEL_ERROR;
|
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);
|
UINT sz_tmp = Endian16(((EAP_MESSAGE *)a.Data)->Len);
|
||||||
|
|
||||||
@ -1691,15 +1691,8 @@ RADIUS_PACKET *ParseRadiusPacket(void *data, UINT size)
|
|||||||
|
|
||||||
LABEL_ERROR:
|
LABEL_ERROR:
|
||||||
|
|
||||||
if (p != NULL)
|
FreeRadiusPacket(p);
|
||||||
{
|
FreeBuf(buf);
|
||||||
FreeRadiusPacket(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buf != NULL)
|
|
||||||
{
|
|
||||||
FreeBuf(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user