diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-12-30 23:54:49 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-12-30 23:54:49 +0100 |
| commit | 28b866b150243693179ce01e8306079b648f8794 (patch) | |
| tree | 05b6bc9941f79ec80e899258118bc90ca7710a22 /libpcsxcore/socket.c | |
| parent | 364102c0b6eca37d9782a83f59b32ea0b98ffbae (diff) | |
| download | pcsxr-28b866b150243693179ce01e8306079b648f8794.tar.gz | |
Consider sockets less than zero as invalid
Diffstat (limited to 'libpcsxcore/socket.c')
| -rw-r--r-- | libpcsxcore/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpcsxcore/socket.c b/libpcsxcore/socket.c index bbb9ce31..77ed7a49 100644 --- a/libpcsxcore/socket.c +++ b/libpcsxcore/socket.c @@ -180,7 +180,7 @@ static enum read_socket_err ReadSocketOS(int client_socket, char *buf, size_t *c enum read_socket_err ReadSocket(int client_socket, char *buf, size_t *const len) { char * endl; - if (!client_socket || !buf || !len || !*len) + if (client_socket < 0 || !buf || !len || !*len) return READ_SOCKET_ERR_INVALID_ARG; return ReadSocketOS(client_socket, buf, len); |
