From 7f22e3ea7f713867e1fbf2ef71b6a6e36e1f0531 Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Sun, 28 Oct 2012 21:07:16 +1100 Subject: [PATCH] oggstream: fix crash with 0 byte ogg packets https://bugzilla.gnome.org/show_bug.cgi?id=687030 --- ext/ogg/gstoggstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index c79f0889a9..fe28f2e21f 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) {