From 2aca2188999d8986b664d4813b88c5c5823dc977 Mon Sep 17 00:00:00 2001 From: Ankur Sharma Date: Sat, 11 Oct 2014 15:07:41 -0700 Subject: datapath-windows: Fix assertion in Netlink.c NlBufAt should be called with valid boundary limits (within head and tail). Incorrect argument to NlBufAt was leading to assert hit, fixed the same. Signed-off-by: Ankur Sharma Acked-by: Nithin Raju Tested-by: Nithin Raju Signed-off-by: Ben Pfaff --- datapath-windows/ovsext/Netlink/Netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'datapath-windows/ovsext/Netlink') diff --git a/datapath-windows/ovsext/Netlink/Netlink.c b/datapath-windows/ovsext/Netlink/Netlink.c index 7ec651f08..ae10a870d 100644 --- a/datapath-windows/ovsext/Netlink/Netlink.c +++ b/datapath-windows/ovsext/Netlink/Netlink.c @@ -51,7 +51,7 @@ NlFillOvsMsg(PNL_BUFFER nlBuf, UINT16 nlmsgType, /* To keep compiler happy for release build. */ UNREFERENCED_PARAMETER(offset); - ASSERT(NlBufAt(nlBuf, offset, sizeof(struct _OVS_MESSAGE)) != 0); + ASSERT(NlBufAt(nlBuf, offset, 0) != 0); msgOut.nlMsg.nlmsgType = nlmsgType; msgOut.nlMsg.nlmsgFlags = nlmsgFlags; @@ -88,7 +88,7 @@ NlFillNlHdr(PNL_BUFFER nlBuf, UINT16 nlmsgType, /* To keep compiler happy for release build. */ UNREFERENCED_PARAMETER(offset); - ASSERT(NlBufAt(nlBuf, offset, sizeof(struct _NL_MSG_HDR)) != 0); + ASSERT(NlBufAt(nlBuf, offset, 0) != 0); msgOut.nlmsgType = nlmsgType; msgOut.nlmsgFlags = nlmsgFlags; -- cgit v1.2.1