---
libavformat/tcp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 0ed11f3..8d53155 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -84,8 +84,16 @@ static int tcp_open(URLContext *h, const char *uri, int
flags)
if (listen_socket) {
int fd1;
ret = bind(fd, cur_ai->ai_addr, cur_ai->ai_addrlen);
+ if (ret) {
+ ret = ff_neterrno();
+ goto fail1;
+ }
listen(fd, 1);
fd1 = accept(fd, NULL, NULL);
+ if (fd1 < 0) {
+ ret = ff_neterrno();
+ goto fail1;
+ }
closesocket(fd);
fd = fd1;
ff_socket_nonblock(fd, 1);
--
1.7.9.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel