wok diff gst-plugins-base/stuff/oggstream-fix-crashes-with-0-byte-vorbis-packets.patch @ rev 11185

Up: gst-plugins-base to 0.10.35.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Nov 03 01:02:38 2011 +0000 (2011-11-03)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gst-plugins-base/stuff/oggstream-fix-crashes-with-0-byte-vorbis-packets.patch	Thu Nov 03 01:02:38 2011 +0000
     1.3 @@ -0,0 +1,22 @@
     1.4 +From 8bd3bdaf3768b3fb6adc85b3bc681fdce07b786e Mon Sep 17 00:00:00 2001
     1.5 +From: Jonathan Liu <net147@gmail.com>
     1.6 +Date: Wed, 03 Aug 2011 08:18:29 +0000
     1.7 +Subject: oggstream: Fix crashes with 0-byte vorbis packets
     1.8 +
     1.9 +Fixes bug #655574.
    1.10 +---
    1.11 +diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c
    1.12 +index e843f48..77f39d4 100644
    1.13 +--- a/ext/ogg/gstoggstream.c
    1.14 ++++ b/ext/ogg/gstoggstream.c
    1.15 +@@ -792,7 +792,7 @@ packet_duration_vorbis (GstOggStream * pad, ogg_packet * packet)
    1.16 +   int size;
    1.17 +   int duration;
    1.18 + 
    1.19 +-  if (packet->packet[0] & 1)
    1.20 ++  if (packet->bytes == 0 || packet->packet[0] & 1)
    1.21 +     return 0;
    1.22 + 
    1.23 +   mode = (packet->packet[0] >> 1) & ((1 << pad->vorbis_log2_num_modes) - 1);
    1.24 +--
    1.25 +cgit v0.8.3-6-g21f6