summaryrefslogtreecommitdiff
path: root/extra/gstreamer0.10-base/theoradec-segfault-on-0-byte-ogg_packet-in-_chain_reverse.patch
blob: b9883d407f7b7aae4804eb6debda1301d92e8033 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From 7d22d91fca6b9f24ca205eef98031f1ed6a44d33 Mon Sep 17 00:00:00 2001
From: Philip Jägenstedt <philipj@opera.com>
Date: Tue, 26 Jul 2011 14:10:17 +0000
Subject: theoradec: segfault on 0-byte ogg_packet in _chain_reverse

---
diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c
index 96e12ee..25d68db 100644
--- a/ext/theora/gsttheoradec.c
+++ b/ext/theora/gsttheoradec.c
@@ -1440,7 +1440,7 @@ theora_dec_chain_reverse (GstTheoraDec * dec, gboolean discont, GstBuffer * buf)
 
       /* if we copied a keyframe, flush and decode the decode queue */
       data = GST_BUFFER_DATA (gbuf);
-      if ((data[0] & 0x40) == 0) {
+      if (data && (data[0] & 0x40) == 0) {
         GST_DEBUG_OBJECT (dec, "copied keyframe");
         res = theora_dec_flush_decode (dec);
       }
--
cgit v0.8.3-6-g21f6