summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h2
-rw-r--r--libavformat/daud.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 3d4b0242a1..3eb4a1e3fb 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1006,8 +1006,8 @@ void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
#if FF_API_PKT_DUMP
attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt,
-#endif
int dump_payload);
+#endif
/**
* Initialize libavformat and register all the muxers, demuxers and
diff --git a/libavformat/daud.c b/libavformat/daud.c
index 7aa1b6dad2..6a36d28acb 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);