[libvorbis] 01/01: Take into account error codes returned from "vorbis_packet_blocksize" in "_initial_pcmoffset" (follow-up problem related to #774516).

Martin Steghöfer martin.steghoefer-guest at moszumanska.debian.org
Thu Jan 15 18:22:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

martin.steghoefer-guest pushed a commit to branch master
in repository libvorbis.

commit 06afb7fcccd7f112958baf7929a06ff0399376e7
Author: Martin Steghöfer <martin at steghoefer.eu>
Date:   Sun Jan 4 23:20:40 2015 +0100

    Take into account error codes returned from "vorbis_packet_blocksize" in "_initial_pcmoffset" (follow-up problem related to #774516).
    
    Thanks: Timothy B. Terriberry
---
 ...ccount-error-codes-returned-from-vorbis_p.patch | 31 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 32 insertions(+)

diff --git a/debian/patches/0006-Take-into-account-error-codes-returned-from-vorbis_p.patch b/debian/patches/0006-Take-into-account-error-codes-returned-from-vorbis_p.patch
new file mode 100644
index 0000000..5bad316
--- /dev/null
+++ b/debian/patches/0006-Take-into-account-error-codes-returned-from-vorbis_p.patch
@@ -0,0 +1,31 @@
+From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin at steghoefer.eu>
+Date: Sun, 4 Jan 2015 23:20:23 +0100
+Subject: Take into account error codes returned from
+ "vorbis_packet_blocksize" in "_initial_pcmoffset".
+
+Author: Timothy B. Terriberry <tterribe at xiph.org>
+Origin: https://trac.xiph.org/ticket/2140#comment:5
+Forwarded: https://trac.xiph.org/ticket/2142
+---
+ lib/vorbisfile.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c
+index b2e9f83..1dcda9f 100644
+--- a/lib/vorbisfile.c
++++ b/lib/vorbisfile.c
+@@ -438,9 +438,11 @@ static ogg_int64_t _initial_pcmoffset(OggVorbis_File *vf, vorbis_info *vi){
+     while((result=ogg_stream_packetout(&vf->os,&op))){
+       if(result>0){ /* ignore holes */
+         long thisblock=vorbis_packet_blocksize(vi,&op);
+-        if(lastblock!=-1)
+-          accumulated+=(lastblock+thisblock)>>2;
+-        lastblock=thisblock;
++        if(thisblock>=0){
++          if(lastblock!=-1)
++            accumulated+=(lastblock+thisblock)>>2;
++          lastblock=thisblock;
++        }
+       }
+     }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 05d7c0e..3e65504 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-Fix-hang-when-loading-Ogg-Theora-files-in-audacity.patch
 0004-Add-sampling-rate-sanity-check-to-avoid-invalid-memo.patch
 0005-Fix-crash-on-corrupt-input-file-invalid-mode-index.patch
+0006-Take-into-account-error-codes-returned-from-vorbis_p.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-xiph/libvorbis.git



More information about the pkg-xiph-commits mailing list