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>
(cherry picked from commit 49c55ed26c
)
This commit is contained in:
parent
d05e801eef
commit
4ebb3c1bb6
@ -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