summaryrefslogtreecommitdiff
path: root/extra/gstreamer0.10-base/oggstream-fix-crashes-with-0-byte-vorbis-packets.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/gstreamer0.10-base/oggstream-fix-crashes-with-0-byte-vorbis-packets.patch')
-rw-r--r--extra/gstreamer0.10-base/oggstream-fix-crashes-with-0-byte-vorbis-packets.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/extra/gstreamer0.10-base/oggstream-fix-crashes-with-0-byte-vorbis-packets.patch b/extra/gstreamer0.10-base/oggstream-fix-crashes-with-0-byte-vorbis-packets.patch
new file mode 100644
index 000000000..8ba4c8ed3
--- /dev/null
+++ b/extra/gstreamer0.10-base/oggstream-fix-crashes-with-0-byte-vorbis-packets.patch
@@ -0,0 +1,22 @@
+From 8bd3bdaf3768b3fb6adc85b3bc681fdce07b786e Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Wed, 03 Aug 2011 08:18:29 +0000
+Subject: oggstream: Fix crashes with 0-byte vorbis packets
+
+Fixes bug #655574.
+---
+diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c
+index e843f48..77f39d4 100644
+--- a/ext/ogg/gstoggstream.c
++++ b/ext/ogg/gstoggstream.c
+@@ -792,7 +792,7 @@ packet_duration_vorbis (GstOggStream * pad, ogg_packet * packet)
+ int size;
+ int duration;
+
+- if (packet->packet[0] & 1)
++ if (packet->bytes == 0 || packet->packet[0] & 1)
+ return 0;
+
+ mode = (packet->packet[0] >> 1) & ((1 << pad->vorbis_log2_num_modes) - 1);
+--
+cgit v0.8.3-6-g21f6