From d917b2ac73ad1c18fa1552e5775283e737bba5ad Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Sun, 12 Jul 2020 03:26:30 +0200 Subject: [PATCH] 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. --- src/Cedar/Proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cedar/Proto.c b/src/Cedar/Proto.c index 865bf19b..84379e3a 100644 --- a/src/Cedar/Proto.c +++ b/src/Cedar/Proto.c @@ -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; }