[PATCH] nsiproxy: Allow the name length to be IFNAMSIZ - 1.

Huw Davies huw at codeweavers.com
Thu Dec 23 01:25:19 CST 2021


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52214
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/nsiproxy.sys/ndis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c
index 86c4248c9ec..036e8f1eb0c 100644
--- a/dlls/nsiproxy.sys/ndis.c
+++ b/dlls/nsiproxy.sys/ndis.c
@@ -259,7 +259,7 @@ static struct if_entry *add_entry( DWORD index, char *name )
     struct if_entry *entry;
     int name_len = strlen( name );
 
-    if (name_len >= IFNAMSIZ - 1) return NULL;
+    if (name_len >= sizeof(entry->if_unix_name)) return NULL;
     entry = malloc( sizeof(*entry) );
     if (!entry) return NULL;
 
-- 
2.23.0




More information about the wine-devel mailing list