ffserver: do not ignore getsockname() return
authorReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
Mon, 28 Apr 2014 18:02:11 +0000 (14:02 -0400)
committerReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
Tue, 29 Apr 2014 03:54:58 +0000 (23:54 -0400)
Should fix FFmpeg Coverity Scan issue #732176

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

index 20900fb..589ba5f 100644 (file)
@@ -1759,7 +1759,10 @@ static int http_parse_request(HTTPContext *c)
                             q += strlen(q);
 
                             len = sizeof(my_addr);
-                            getsockname(c->fd, (struct sockaddr *)&my_addr, &len);
+
+                            /* XXX: Should probably fail? */
+                            if (getsockname(c->fd, (struct sockaddr *)&my_addr, &len))
+                                http_log("getsockname() failed\n");
 
                             /* XXX: should use a dynamic buffer */
                             sdp_data_size = prepare_sdp_description(stream,