diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2017-07-14 04:40:52 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-08-02 11:25:25 -0700 |
commit | 4f967565aed2ed4baf3f7f23c0f579e0b873cbfc (patch) | |
tree | 69d58fce6e5be14e4e903e078fa3fa14fbbfeb6e /datapath-windows/ovsext | |
parent | 043b1405b50a881953aff99affd2ee6d3448d3b7 (diff) | |
download | openvswitch-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.c | 4 |
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); |