mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
socket: Check return value of buffer function.
Found by Coverity.
This commit is contained in:
@@ -278,7 +278,10 @@ int ssh_socket_pollcallback(struct ssh_poll_handle_struct *p, socket_t fd, int r
|
||||
}
|
||||
if(r>0){
|
||||
/* Bufferize the data and then call the callback */
|
||||
buffer_add_data(s->in_buffer,buffer,r);
|
||||
r = buffer_add_data(s->in_buffer,buffer,r);
|
||||
if (r < 0) {
|
||||
return -1;
|
||||
}
|
||||
if(s->callbacks && s->callbacks->data){
|
||||
r= s->callbacks->data(buffer_get_rest(s->in_buffer),
|
||||
buffer_get_rest_len(s->in_buffer),
|
||||
|
||||
Reference in New Issue
Block a user