mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[WS2_32]
- Fix a memory overwrite bug in some crappy WINE code that leads to nasty memory corruption of the service cache entry. This corrupts the first field of the cache, causing it to always reallocate memory because it thinks the size is 0. This would be even worse if the code didn't overwrite the other 12 bytes of corruption with proper data on the next lines. This also caused the aliases value to be garbage because it pointed at uninitialized data. svn path=/trunk/; revision=57199
This commit is contained in:
parent
049ada7e9d
commit
a9e04af2a5
1 changed files with 2 additions and 2 deletions
|
@ -1275,7 +1275,7 @@ getservbyname(IN CONST CHAR FAR* name,
|
|||
WS_DbgPrint(MAX_TRACE,("Aliase %d: %s\n", i, Aliases[i]));
|
||||
}
|
||||
|
||||
memcpy(p->Getservbyname,
|
||||
memcpy(p->Getservbyname->Aliases,
|
||||
Aliases,
|
||||
sizeof(Aliases));
|
||||
|
||||
|
@ -1457,7 +1457,7 @@ getservbyport(IN INT port,
|
|||
WS_DbgPrint(MAX_TRACE,("Aliases %d: %s\n", i, Aliases[i]));
|
||||
}
|
||||
|
||||
memcpy(p->Getservbyport,Aliases,sizeof(Aliases));
|
||||
memcpy(p->Getservbyport->Aliases,Aliases,sizeof(Aliases));
|
||||
|
||||
/* Create the struct proper */
|
||||
p->Getservbyport->ServerEntry.s_name = ServiceName;
|
||||
|
|
Loading…
Reference in a new issue