diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2017-07-14 04:40:56 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-08-02 11:31:02 -0700 |
commit | 445995a8e270d6a7301fbc09b482d3e177172edb (patch) | |
tree | 843a95f66a9fdabc7e0ffc86898037801163bf8a | |
parent | 0d4374aa82dea2dc316c432c0cfee371456fcf9d (diff) | |
download | openvswitch-445995a8e270d6a7301fbc09b482d3e177172edb.tar.gz |
datapath-windows: Fix possible NULL deference in OvsFullCopyNBL
Check if the first net buffer exists before trying to copy it.
Found using WDK 10 static code analysis.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Shashank Ram <rams@vmware.com>
-rw-r--r-- | datapath-windows/ovsext/BufferMgmt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/BufferMgmt.c b/datapath-windows/ovsext/BufferMgmt.c index 13eaf9529..1ede4a32e 100644 --- a/datapath-windows/ovsext/BufferMgmt.c +++ b/datapath-windows/ovsext/BufferMgmt.c @@ -985,6 +985,9 @@ OvsFullCopyNBL(PVOID ovsContext, } nb = NET_BUFFER_LIST_FIRST_NB(nbl); + if (nb == NULL) { + return NULL; + } if (NET_BUFFER_NEXT_NB(nb) == NULL) { return OvsCopySinglePacketNBL(context, nbl, nb, headRoom, copyNblInfo); |