reqs: Fix CID 1130967 - unchecked return value from library.
Check the return code of fcntl via socket_blocking
in pull_client_data().
Found by coverity.
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 0a99803425)
			
			
This commit is contained in:
		
							parent
							
								
									9eec142886
								
							
						
					
					
						commit
						6c8d9de3cc
					
				@ -527,7 +527,13 @@ static int pull_client_data (struct conn_s *connptr, long int length)
 | 
			
		||||
         */
 | 
			
		||||
        socket_nonblocking (connptr->client_fd);
 | 
			
		||||
        len = recv (connptr->client_fd, buffer, 2, MSG_PEEK);
 | 
			
		||||
        socket_blocking (connptr->client_fd);
 | 
			
		||||
 | 
			
		||||
        ret = socket_blocking (connptr->client_fd);
 | 
			
		||||
        if (ret != 0) {
 | 
			
		||||
                log_message(LOG_ERR, "Failed to set the client socket "
 | 
			
		||||
                            "to blocking: %s", strerror(errno));
 | 
			
		||||
                goto ERROR_EXIT;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (len < 0 && errno != EAGAIN)
 | 
			
		||||
                goto ERROR_EXIT;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user