Cedar/Proto.c: check whether IsPacketForMe() is available before calling it

The SSTP implementation doesn't provide packet identification, because it's not required: the protocol is identified by the HTTP header it sends to the server.
This commit is contained in:
Davide Beatrici committed 2020-07-17 01:59:41 +02:00
1 parent 96a2d5a124
commit d917b2ac73
1 file changed
+1 -1
+1 -1
View File
@@ -187,7 +187,7 @@ PROTO_IMPL *ProtoImplDetect(PROTO *proto, const PROTO_MODE mode, const UCHAR *da
for (i = 0; i < LIST_NUM(proto->Impls); ++i)
{
PROTO_IMPL *impl = LIST_DATA(proto->Impls, i);
if (impl->IsPacketForMe(mode, data, size) == false)
if (impl->IsPacketForMe == NULL || impl->IsPacketForMe(mode, data, size) == false)
{
continue;
}