[FFmpeg-cvslog] ffserver: do not ignore getsockname() return

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


ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <r.verdejo at sisa.samsung.com> | Mon Apr 28 14:02:11 2014 -0400| [898192e0299ed35e03401fa22df2f7e496b95a52] | committer: Reynaldo H. Verdejo Pinochet

ffserver: do not ignore getsockname() return

Should fix FFmpeg Coverity Scan issue #732176

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

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

 ffserver.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ffserver.c b/ffserver.c
index 20900fb..589ba5f 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -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,



More information about the ffmpeg-cvslog mailing list