[FFmpeg-cvslog] avformat/network: check for fcntl() failure in ff_socket()
Michael Niedermayer
git at videolan.org
Sun Oct 20 16:54:17 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 20 16:34:32 2013 +0200| [baab248c499a7689aefb5f2e9c004338deb08d74] | committer: Michael Niedermayer
avformat/network: check for fcntl() failure in ff_socket()
Fixes: CID1087075
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=baab248c499a7689aefb5f2e9c004338deb08d74
---
libavformat/network.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/network.c b/libavformat/network.c
index 4f04861..2ba435d 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -245,8 +245,10 @@ int ff_socket(int af, int type, int proto)
{
fd = socket(af, type, proto);
#if HAVE_FCNTL
- if (fd != -1)
- fcntl(fd, F_SETFD, FD_CLOEXEC);
+ if (fd != -1) {
+ if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
+ av_log(NULL, AV_LOG_DEBUG, "Failed to set close on exec\n");
+ }
#endif
}
return fd;
More information about the ffmpeg-cvslog
mailing list