diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-03 13:36:46 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-20 23:52:55 +0200 |
| commit | a527164cb5b06055c7696eb4247f8cebee6cf23d (patch) | |
| tree | 9ac9834c275175b1d8db3a951a1ef039a9322db7 /include | |
| parent | ea164273451783a89afed8bafdb52ef4dafe1d6a (diff) | |
server.c: Fix undefined behaviour on >1 clients
server.c kept an array of all of its active clients, calling realloc(3)
everytime its size had to be modified. However, reallocating this array
had the undesired consequence of moving other active clients to other
memory locations.
Potentially, this would result in dangling pointers from other
components that also kept pointers to struct server_client instances
e.g.: handler.c.
For this reason, the array-based approach has been completely dropped,
in favour of a doubly-linked list.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
