[FFmpeg-devel] [PATCH 04/11] avformat/librtmp: check return value of setsockopt
Timo Rothenpieler
timo at rothenpieler.org
Sun Jun 11 17:05:46 EEST 2017
Fixes CID 1396837
---
libavformat/librtmp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
index 146df660ac..f3cfa9a8e2 100644
--- a/libavformat/librtmp.c
+++ b/libavformat/librtmp.c
@@ -239,7 +239,10 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
#if CONFIG_NETWORK
if (ctx->buffer_size >= 0 && (flags & AVIO_FLAG_WRITE)) {
int tmp = ctx->buffer_size;
- setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp));
+ if (setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp))) {
+ rc = AVERROR_EXTERNAL;
+ goto fail;
+ }
}
#endif
--
2.13.0
More information about the ffmpeg-devel
mailing list