mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
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
This commit is contained in:
parent
eb4f906900
commit
09e1ccc8cd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user