Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-10-09 19:57:14 +0400
committerLuca Barbato <lu_zero@gentoo.org>2014-10-10 18:29:06 +0400
commit09e1ccc8cddc946da5e10841f10dc5ebdd187d9d (patch)
tree7f6c1ea201c33fee5c6e3b97f7f55265a04b0437 /libavformat/sctp.c
parenteb4f9069002e73648f6640cd054fc814cfda75b8 (diff)
sctp: Use AVERROR_BUG instead of abort()
Trying to write to a stream id larger the the maximum requested is a programming error, still there is no reason to leave a reachable abort() in the codebase. CC: libav-stable@libav.org
Diffstat (limited to 'libavformat/sctp.c')
-rw-r--r--libavformat/sctp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/sctp.c b/libavformat/sctp.c
index 84a4ac1938..9cfaeccd17 100644
--- a/libavformat/sctp.c
+++ b/libavformat/sctp.c
@@ -297,7 +297,7 @@ static int sctp_write(URLContext *h, const uint8_t *buf, int size)
struct sctp_sndrcvinfo info = { 0 };
info.sinfo_stream = AV_RB16(buf);
if (info.sinfo_stream > s->max_streams)
- abort();
+ return AVERROR_BUG;
ret = ff_sctp_send(s->fd, buf + 2, size - 2, &info, MSG_EOR);
} else
ret = send(s->fd, buf, size, MSG_NOSIGNAL);