aboutsummaryrefslogtreecommitdiff
path: root/multimedia/gst0-plugins-base/patches/00-fix-crash-0-byte-ogg.patch
blob: 2c03e820b535a34192bc836f6633358c86faad7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 7f22e3ea7f713867e1fbf2ef71b6a6e36e1f0531 Mon Sep 17 00:00:00 2001
From: Jonathan Liu <net147@gmail.com>
Date: Sun, 28 Oct 2012 10:07:16 +0000
Subject: oggstream: fix crash with 0 byte ogg packets

https://bugzilla.gnome.org/show_bug.cgi?id=687030
---
diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c
index c79f088..fe28f2e 100644
--- a/ext/ogg/gstoggstream.c
+++ b/ext/ogg/gstoggstream.c
@@ -790,7 +790,7 @@ setup_vorbis_mapper (GstOggStream * pad, ogg_packet * packet)
 static gboolean
 is_header_vorbis (GstOggStream * pad, ogg_packet * packet)
 {
-  if (packet->bytes > 0 && (packet->packet[0] & 0x01) == 0)
+  if (packet->bytes == 0 || (packet->packet[0] & 0x01) == 0)
     return FALSE;
 
   if (packet->packet[0] == 5) {
--
cgit v0.9.0.2-2-gbebe