On Fri, Apr 8, 2011 at 2:38 PM, Alex Converse <[email protected]> wrote:
> ---
>  libavformat/daud.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>

Let's try it again with the words in the correct order.
From bd42249155271af2127a00260b6eb3d36d08891c Mon Sep 17 00:00:00 2001
From: Alex Converse <[email protected]>
Date: Fri, 8 Apr 2011 14:35:17 -0700
Subject: [PATCH] daud: Don't write packets that are too large to have their size expressed in the bytestream.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1"

This is a multi-part message in MIME format.
--------------1
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 libavformat/daud.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


--------------1
Content-Type: text/x-patch; name="0001-daud-Don-t-write-packets-that-are-too-large-to-have-.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-daud-Don-t-write-packets-that-are-too-large-to-have-.patch"

diff --git a/libavformat/daud.c b/libavformat/daud.c
index ca9be27..1b3cfcf 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);

--------------1--


_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to