summaryrefslogtreecommitdiff
path: root/libavformat/librtmp.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2017-06-11 15:08:43 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2017-06-13 19:48:08 +0200
commit4b2a2969f3e06433a06f835d2af2bae4499314ae (patch)
treeb64e9f12c2af3e2e522fb1db06420520f4f231e6 /libavformat/librtmp.c
parent0fbc9bbbbb39b9a6f62d57f237052b64eefac578 (diff)
avformat/librtmp: check return value of setsockopt
Fixes CID 1396837
Diffstat (limited to 'libavformat/librtmp.c')
-rw-r--r--libavformat/librtmp.c5
1 files changed, 4 insertions, 1 deletions
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