Module: wine Branch: master Commit: 74045dc812eea94a15d89871d8b3f3038fc30e48 URL: https://source.winehq.org/git/wine.git/?a=commit;h=74045dc812eea94a15d89871d...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Dec 7 16:14:12 2021 +0100
ws2_32: Fix a potential buffer overflow in the Unix interface.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ws2_32/unixlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c index 67edf06368e..5726fc31e3e 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c @@ -783,7 +783,7 @@ static int hostent_from_unix( const struct hostent *unix_host, struct WS_hostent unsigned int needed_size = sizeof( struct WS_hostent ), alias_count = 0, addr_count = 0, i; char *p;
- needed_size += strlen( unix_host->h_name ); + needed_size += strlen( unix_host->h_name ) + 1;
for (alias_count = 0; unix_host->h_aliases[alias_count] != NULL; ++alias_count) needed_size += sizeof(char *) + strlen( unix_host->h_aliases[alias_count] ) + 1;