iphlpapi: Fix possible Out-of-bounds write (Coverity).

This commit is contained in:
André Hentschel 2015-07-19 23:21:37 +02:00 committed by Alexandre Julliard
parent ce409c01d5
commit 10b91549ed
1 changed files with 1 additions and 1 deletions

View File

@ -1989,7 +1989,7 @@ static unsigned int find_owning_pid( struct pid_map *map, unsigned int num_entri
int len;
sprintf( link, "/proc/%u/fd/%s", map[i].unix_pid, dirent->d_name );
if ((len = readlink( link, name, 32 )) > 0) name[len] = 0;
if ((len = readlink( link, name, sizeof(name) - 1 )) > 0) name[len] = 0;
if (len == len_socket && !strcmp( socket, name ))
{
closedir( dirfd );