Huw Davies : nsiproxy: Allow the name length to be IFNAMSIZ - 1.

Alexandre Julliard julliard at winehq.org
Thu Dec 23 16:01:32 CST 2021


Module: wine
Branch: master
Commit: 65f04bcc9786296a36a3155c115058d22c49b6ad
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=65f04bcc9786296a36a3155c115058d22c49b6ad

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Dec 23 07:25:19 2021 +0000

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

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52214
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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;
 




More information about the wine-cvs mailing list