[FFmpeg-cvslog] ffserver: do not ignore ff_socket_nonblock return

Reynaldo H. Verdejo Pinochet git at videolan.org
Tue Apr 29 07:12:12 CEST 2014


ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <r.verdejo at sisa.samsung.com> | Mon Apr 28 11:46:57 2014 -0400| [6d953ae2c4a49a0e19b558be72fb1a4c46f46705] | committer: Reynaldo H. Verdejo Pinochet

ffserver: do not ignore ff_socket_nonblock return

Should fix FFmpeg Coverity Scan issues #732180 & #732182

Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo at sisa.samsung.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d953ae2c4a49a0e19b558be72fb1a4c46f46705
---

 ffserver.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index b9825a1..dd55751 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -572,7 +572,9 @@ static int socket_open_listen(struct sockaddr_in *my_addr)
         closesocket(server_fd);
         return -1;
     }
-    ff_socket_nonblock(server_fd, 1);
+
+    if (ff_socket_nonblock(server_fd, 1) < 0)
+        av_log(NULL, AV_LOG_WARNING, "ff_socket_nonblock failed\n");
 
     return server_fd;
 }
@@ -826,7 +828,8 @@ static void new_connection(int server_fd, int is_rtsp)
         http_log("error during accept %s\n", strerror(errno));
         return;
     }
-    ff_socket_nonblock(fd, 1);
+    if (ff_socket_nonblock(fd, 1) < 0)
+        av_log(NULL, AV_LOG_WARNING, "ff_socket_nonblock failed\n");
 
     if (nb_connections >= nb_max_connections) {
         http_send_too_busy_reply(fd);



More information about the ffmpeg-cvslog mailing list