[FFmpeg-cvslog] sctp: Use AVERROR_BUG instead of abort()

Luca Barbato git at videolan.org
Fri Oct 10 21:02:58 CEST 2014


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Thu Oct  9 17:57:14 2014 +0200| [09e1ccc8cddc946da5e10841f10dc5ebdd187d9d] | committer: Luca Barbato

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 at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09e1ccc8cddc946da5e10841f10dc5ebdd187d9d
---

 libavformat/sctp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/sctp.c b/libavformat/sctp.c
index 84a4ac1..9cfaecc 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);



More information about the ffmpeg-cvslog mailing list