summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext
diff options
context:
space:
mode:
authorAlin Serdean <aserdean@cloudbasesolutions.com>2017-07-14 04:40:52 +0000
committerBen Pfaff <blp@ovn.org>2017-08-02 11:25:25 -0700
commit4f967565aed2ed4baf3f7f23c0f579e0b873cbfc (patch)
tree69d58fce6e5be14e4e903e078fa3fa14fbbfeb6e /datapath-windows/ovsext
parent043b1405b50a881953aff99affd2ee6d3448d3b7 (diff)
downloadopenvswitch-4f967565aed2ed4baf3f7f23c0f579e0b873cbfc.tar.gz
datapath-windows: interfaceName overflow in IpHelper
Bump the size of interfaceName so an overflow cannot occur when using `ConvertInterfaceLuidToAlias`. 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>
Diffstat (limited to 'datapath-windows/ovsext')
-rw-r--r--datapath-windows/ovsext/IpHelper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/IpHelper.c b/datapath-windows/ovsext/IpHelper.c
index 2897e10d6..e98dcd1bd 100644
--- a/datapath-windows/ovsext/IpHelper.c
+++ b/datapath-windows/ovsext/IpHelper.c
@@ -369,7 +369,7 @@ OvsGetRoute(SOCKADDR_INET *destinationAddress,
SOCKADDR_INET crtSrcAddr = { 0 };
MIB_IPFORWARD_ROW2 crtRoute = { 0 };
POVS_IPHELPER_INSTANCE crtInstance = NULL;
- WCHAR interfaceName[IF_MAX_STRING_SIZE] = { 0 };
+ WCHAR interfaceName[IF_MAX_STRING_SIZE + 1] = { 0 };
crtInstance = CONTAINING_RECORD(link, OVS_IPHELPER_INSTANCE, link);
@@ -608,7 +608,7 @@ OvsAddIpInterfaceNotification(PMIB_IPINTERFACE_ROW ipRow)
InitializeListHead(&instance->link);
ExInitializeResourceLite(&instance->lock);
- WCHAR interfaceName[IF_MAX_STRING_SIZE] = { 0 };
+ WCHAR interfaceName[IF_MAX_STRING_SIZE + 1] = { 0 };
status = ConvertInterfaceLuidToAlias(&ipRow->InterfaceLuid,
interfaceName,
IF_MAX_STRING_SIZE + 1);