diff options
author | Alex Converse <aconverse@google.com> | 2011-04-08 14:35:17 -0700 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2011-04-09 17:32:09 -0700 |
commit | 347b375a80afbb27c887a243097c09370cb95d19 (patch) | |
tree | b80a001f86f65003698c37bceee5b3ee39673063 /libavformat | |
parent | cf39b461d31a213261cb7dab21e8aeb0bb1673d5 (diff) | |
download | ffmpeg-347b375a80afbb27c887a243097c09370cb95d19.tar.gz |
daud: Don't write packets that are too large to have their size expressed in the bytestream.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/daud.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/daud.c b/libavformat/daud.c index ca9be27905..1b3cfcf2d9 100644 --- a/libavformat/daud.c +++ b/libavformat/daud.c @@ -57,6 +57,11 @@ static int daud_write_header(struct AVFormatContext *s) static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt) { + if (pkt->size > 65535) { + av_log(s, AV_LOG_ERROR, + "Packet size too large for s302m. (%d > 65535)\n", pkt->size); + return -1; + } avio_wb16(s->pb, pkt->size); avio_wb16(s->pb, 0x8010); // unknown avio_write(s->pb, pkt->data, pkt->size); |