`ethHdr` may be NULL while trying to push mpls lables. Found with WDK 10 static code analysis.
Signed-off-by: Alin Gabriel Serdean <[email protected]> --- datapath-windows/ovsext/Actions.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c index ebe8264..39539e0 100644 --- a/datapath-windows/ovsext/Actions.c +++ b/datapath-windows/ovsext/Actions.c @@ -1244,6 +1244,10 @@ OvsActionMplsPush(OvsForwardingContext *ovsFwdCtx, ASSERT(mdlLen >= MPLS_HLEN); ethHdr = (EthHdr *)(bufferStart + curMdlOffset); + if (!ethHdr) { + ovsActionStats.noResource++; + return NDIS_STATUS_RESOURCES; + } RtlMoveMemory(ethHdr, (UINT8*)ethHdr + MPLS_HLEN, sizeof(*ethHdr)); ethHdr->Type = mpls->mpls_ethertype; -- 2.10.2.windows.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
