Message ID | 20170714044033.15196-11-aserdean@cloudbasesolutions.com |
---|---|
State | Accepted |
Headers | show |
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;
`ethHdr` may be NULL while trying to push mpls lables. Found with WDK 10 static code analysis. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> --- datapath-windows/ovsext/Actions.c | 4 ++++ 1 file changed, 4 insertions(+)