network: Fix CID 113095 - unchecked return value from library
Check return of "recv" in readline(). Found by coverity. Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
198600ce42
commit
49c55ed26c
@ -191,7 +191,11 @@ ssize_t readline (int fd, char **whole_buffer)
|
||||
goto CLEANUP;
|
||||
}
|
||||
|
||||
recv (fd, line_ptr->data, diff, 0);
|
||||
ret = recv (fd, line_ptr->data, diff, 0);
|
||||
if (ret == -1) {
|
||||
goto CLEANUP;
|
||||
}
|
||||
|
||||
line_ptr->len = diff;
|
||||
|
||||
if (ptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user