diff --git a/.cvsignore b/.cvsignore index 98dbf70..2773290 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ libvorbis-1.2.0.tar.bz2 +libvorbis-1.2.2rc1.tar.bz2 diff --git a/libvorbis-1.0-m4.patch b/libvorbis-1.0-m4.patch deleted file mode 100644 index 4e48194..0000000 --- a/libvorbis-1.0-m4.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up libvorbis-1.2.0/configure.foo libvorbis-1.2.0/configure ---- libvorbis-1.2.0/configure.foo 2008-09-07 16:51:15.000000000 +0200 -+++ libvorbis-1.2.0/configure 2008-09-07 16:51:24.000000000 +0200 -@@ -19936,7 +19936,7 @@ fi - elif test "x$ogg_prefix" != "x" ; then - OGG_LIBS="-L$ogg_prefix/lib" - elif test "x$prefix" != "xNONE" ; then -- OGG_LIBS="-L$prefix/lib" -+ OGG_LIBS="-L$libdir" - fi - - OGG_LIBS="$OGG_LIBS -logg" -@@ -19946,7 +19946,7 @@ fi - elif test "x$ogg_prefix" != "x" ; then - OGG_CFLAGS="-I$ogg_prefix/include" - elif test "x$prefix" != "xNONE"; then -- OGG_CFLAGS="-I$prefix/include" -+ OGG_CFLAGS="" - fi - - { echo "$as_me:$LINENO: checking for Ogg" >&5 -diff -up libvorbis-1.2.0/vorbis.m4.foo libvorbis-1.2.0/vorbis.m4 ---- libvorbis-1.2.0/vorbis.m4.foo 2008-09-07 16:51:15.000000000 +0200 -+++ libvorbis-1.2.0/vorbis.m4 2008-09-07 16:51:24.000000000 +0200 -@@ -20,7 +20,7 @@ AC_ARG_ENABLE(vorbistest, [ --disable-v - elif test "x$vorbis_prefix" != "x" ; then - VORBIS_LIBS="-L$vorbis_prefix/lib" - elif test "x$prefix" != "xNONE"; then -- VORBIS_LIBS="-L$prefix/lib" -+ VORBIS_LIBS="-L$libdir" - fi - - VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm" -@@ -32,7 +32,7 @@ AC_ARG_ENABLE(vorbistest, [ --disable-v - elif test "x$vorbis_prefix" != "x" ; then - VORBIS_CFLAGS="-I$vorbis_prefix/include" - elif test "x$prefix" != "xNONE"; then -- VORBIS_CFLAGS="-I$prefix/include" -+ VORBIS_CFLAGS="" - fi - - diff --git a/libvorbis-underquoted.patch b/libvorbis-underquoted.patch deleted file mode 100644 index 07cabdf..0000000 --- a/libvorbis-underquoted.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libvorbis-1.0.1/vorbis.m4.underquoted 2004-07-15 12:47:00.696848903 +0100 -+++ libvorbis-1.0.1/vorbis.m4 2004-07-15 12:47:17.263684073 +0100 -@@ -6,7 +6,7 @@ - dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) - dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS - dnl --AC_DEFUN(XIPH_PATH_VORBIS, -+AC_DEFUN([XIPH_PATH_VORBIS], - [dnl - dnl Get the cflags and libraries - dnl diff --git a/libvorbis.spec b/libvorbis.spec index 872e6cd..3d62450 100644 --- a/libvorbis.spec +++ b/libvorbis.spec @@ -1,18 +1,13 @@ Summary: The Vorbis General Audio Compression Codec. Name: libvorbis -Version: 1.2.0 -Release: 7%{?dist} +Version: 1.2.2 +Release: 0.1.rc1%{?dist} Epoch: 1 Group: System Environment/Libraries License: BSD URL: http://www.xiph.org/ -Source: http://downloads.xiph.org/releases/vorbis/libvorbis-%{version}.tar.bz2 -Patch0: libvorbis-1.0-m4.patch -Patch1: r14502.patch -Patch2: r14598-CVE-2008-1420.patch -Patch3: r14602-CVE-2008-1419.patch -Patch4: r14602-CVE-2008-1423.patch -Patch5: r14811.patch +#Source: http://downloads.xiph.org/releases/vorbis/libvorbis-%{version}.tar.bz2 +Source: http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.2rc1.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libogg-devel >= 2:1.1 @@ -35,20 +30,22 @@ Obsoletes: vorbis-devel The libvorbis-devel package contains the header files and documentation needed to develop applications with Ogg Vorbis. +%package devel-docs +Summary: Documentation for developing Vorbis applications +Group: Development/Libraries +BuildArch: noarch + +%description devel-docs +Documentation for developing applications with libvorbis. + %prep -%setup -q -%patch0 -p1 -b .m4 -%patch1 -p0 -b .r14502 -%patch2 -p0 -b .r14598-CVE-2008-1420 -%patch3 -p0 -b .r14602-CVE-2008-1419 -%patch4 -p0 -b .r14602-CVE-2008-1423 -%patch5 -p0 -b .r14811 +%setup -q -n libvorbis-1.2.2rc1 perl -p -i -e "s/-O20/$RPM_OPT_FLAGS/" configure perl -p -i -e "s/-ffast-math//" configure -# link to .pdf spec rather than ship redundant copy -perl -p -i -e "s@Vorbis_I_spec.pdf@http://www.xiph.org/ogg/vorbis/doc/Vorbis_I_spec.pdf@" doc/index.html -rm -f doc/Vorbis_I_spec.pdf + +# workaround for bizarre timestamps +find . | xargs touch %build %configure --with-ogg-libraries=%{_libdir} --disable-static @@ -61,11 +58,6 @@ make DESTDIR=$RPM_BUILD_ROOT install # remove unpackaged files from the buildroot rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -# create a cleaned up (Makefile free) copy of doc for -devel %doc -cp -a doc _doc -rm `find _doc -name 'Makefile*'` - - %files %defattr(-,root,root) %doc AUTHORS COPYING README @@ -75,7 +67,6 @@ rm `find _doc -name 'Makefile*'` %files devel %defattr(-,root,root) -%doc _doc/* %{_includedir}/vorbis %{_libdir}/libvorbis.so %{_libdir}/libvorbisfile.so @@ -83,6 +74,10 @@ rm `find _doc -name 'Makefile*'` %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/vorbis.m4 +%files devel-docs +%defattr(-,root,root) +%{_docdir}/libvorbis-1.2.2rc1/ + %clean rm -rf $RPM_BUILD_ROOT @@ -91,6 +86,9 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Wed Jun 03 2009 Adam Jackson 1.2.2-0.1.rc1 +- libvorbis 1.2.2rc1 + * Wed Feb 25 2009 Fedora Release Engineering - 1:1.2.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/r14502.patch b/r14502.patch deleted file mode 100644 index bdb7dc6..0000000 --- a/r14502.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: lib/info.c -=================================================================== ---- lib/info.c (revision 14501) -+++ lib/info.c (revision 14502) -@@ -236,17 +236,21 @@ - int i; - int vendorlen=oggpack_read(opb,32); - if(vendorlen<0)goto err_out; -+ if(vendorlen+8>opb->storage)goto err_out; - vc->vendor=_ogg_calloc(vendorlen+1,1); - _v_readstring(opb,vc->vendor,vendorlen); -- vc->comments=oggpack_read(opb,32); -- if(vc->comments<0)goto err_out; -+ i=oggpack_read(opb,32); -+ if(i<0)goto err_out; -+ if(4*i+oggpack_bytes(opb)>opb->storage)goto err_out; -+ vc->comments=i; - vc->user_comments=_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments)); - vc->comment_lengths=_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths)); - - for(i=0;icomments;i++){ - int len=oggpack_read(opb,32); - if(len<0)goto err_out; -- vc->comment_lengths[i]=len; -+ if(len+oggpack_bytes(opb)>opb->storage)goto err_out; -+ vc->comment_lengths[i]=len; - vc->user_comments[i]=_ogg_calloc(len+1,1); - _v_readstring(opb,vc->user_comments[i],len); - } diff --git a/r14598-CVE-2008-1420.patch b/r14598-CVE-2008-1420.patch deleted file mode 100644 index 819cbf0..0000000 --- a/r14598-CVE-2008-1420.patch +++ /dev/null @@ -1,34 +0,0 @@ -Index: lib/res0.c -=================================================================== ---- lib/res0.c (revision 14597) -+++ lib/res0.c (revision 14598) -@@ -223,6 +223,20 @@ - for(j=0;jbooklist[j]>=ci->books)goto errout; - -+ /* verify the phrasebook is not specifying an impossible or -+ inconsistent partitioning scheme. */ -+ { -+ int entries = ci->book_param[info->groupbook]->entries; -+ int dim = ci->book_param[info->groupbook]->dim; -+ int partvals = 1; -+ while(dim>0){ -+ partvals *= info->partitions; -+ if(partvals > entries) goto errout; -+ dim--; -+ } -+ if(partvals != entries) goto errout; -+ } -+ - return(info); - errout: - res0_free_info(info); -@@ -263,7 +277,7 @@ - } - } - -- look->partvals=rint(pow((float)look->parts,(float)dim)); -+ look->partvals=look->phrasebook->entries; - look->stages=maxstage; - look->decodemap=_ogg_malloc(look->partvals*sizeof(*look->decodemap)); - for(j=0;jpartvals;j++){ diff --git a/r14602-CVE-2008-1419.patch b/r14602-CVE-2008-1419.patch deleted file mode 100644 index fd73f23..0000000 --- a/r14602-CVE-2008-1419.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: lib/codebook.c -=================================================================== ---- lib/codebook.c (revision 14601) -+++ lib/codebook.c (revision 14602) -@@ -225,7 +225,7 @@ - int quantvals=0; - switch(s->maptype){ - case 1: -- quantvals=_book_maptype1_quantvals(s); -+ quantvals=(s->dim==0?0:_book_maptype1_quantvals(s)); - break; - case 2: - quantvals=s->entries*s->dim; diff --git a/r14602-CVE-2008-1423.patch b/r14602-CVE-2008-1423.patch deleted file mode 100644 index 8c7c479..0000000 --- a/r14602-CVE-2008-1423.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: lib/codebook.c -=================================================================== ---- lib/codebook.c (revision 14603) -+++ lib/codebook.c (revision 14604) -@@ -159,6 +159,8 @@ - s->entries=oggpack_read(opb,24); - if(s->entries==-1)goto _eofout; - -+ if(_ilog(s->dim)+_ilog(s->entries)>24)goto _eofout; -+ - /* codeword ordering.... length ordered or unordered? */ - switch((int)oggpack_read(opb,1)){ - case 0: diff --git a/r14811.patch b/r14811.patch deleted file mode 100644 index 623773d..0000000 --- a/r14811.patch +++ /dev/null @@ -1,254 +0,0 @@ -Index: doc/Vorbis_I_spec.pdf -=================================================================== -Cannot display: file marked as a binary type. -svn:mime-type = application/pdf -Index: lib/sharedbook.c -=================================================================== ---- lib/sharedbook.c (revision 14810) -+++ lib/sharedbook.c (revision 14811) -@@ -124,7 +124,14 @@ - }else - if(sparsecount==0)count++; - } -- -+ -+ /* sanity check the huffman tree; an underpopulated tree must be rejected. */ -+ for(i=1;i<33;i++) -+ if(marker[i] & (0xffffffffUL>>(32-i))){ -+ _ogg_free(r); -+ return(NULL); -+ } -+ - /* bitreverse the words because our bitwise packer/unpacker is LSb - endian */ - for(i=0,count=0;ifullbooks){ - ci->fullbooks=_ogg_calloc(ci->books,sizeof(*ci->fullbooks)); - for(i=0;ibooks;i++){ -- vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i]); -+ if(vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i])) -+ return -1; - /* decode codebooks are now standalone after init */ - vorbis_staticbook_destroy(ci->book_param[i]); - ci->book_param[i]=NULL; -@@ -694,9 +695,11 @@ - } - - int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi){ -- if(_vds_shared_init(v,vi,0)) return 1; -+ if(_vds_shared_init(v,vi,0)){ -+ vorbis_dsp_clear(v); -+ return 1; -+ } - vorbis_synthesis_restart(v); -- - return 0; - } - -Index: examples/decoder_example.c -=================================================================== ---- examples/decoder_example.c (revision 14810) -+++ examples/decoder_example.c (revision 14811) -@@ -198,108 +198,111 @@ - - /* OK, got and parsed all three headers. Initialize the Vorbis - packet->PCM decoder. */ -- vorbis_synthesis_init(&vd,&vi); /* central decode state */ -- vorbis_block_init(&vd,&vb); /* local state for most of the decode -- so multiple block decodes can -- proceed in parallel. We could init -- multiple vorbis_block structures -- for vd here */ -- -- /* The rest is just a straight decode loop until end of stream */ -- while(!eos){ -+ if(vorbis_synthesis_init(&vd,&vi)==0){ /* central decode state */ -+ vorbis_block_init(&vd,&vb); /* local state for most of the decode -+ so multiple block decodes can -+ proceed in parallel. We could init -+ multiple vorbis_block structures -+ for vd here */ -+ -+ /* The rest is just a straight decode loop until end of stream */ - while(!eos){ -- int result=ogg_sync_pageout(&oy,&og); -- if(result==0)break; /* need more data */ -- if(result<0){ /* missing or corrupt data at this page position */ -- fprintf(stderr,"Corrupt or missing data in bitstream; " -- "continuing...\n"); -- }else{ -- ogg_stream_pagein(&os,&og); /* can safely ignore errors at -- this point */ -- while(1){ -- result=ogg_stream_packetout(&os,&op); -- -- if(result==0)break; /* need more data */ -- if(result<0){ /* missing or corrupt data at this page position */ -- /* no reason to complain; already complained above */ -- }else{ -- /* we have a packet. Decode it */ -- float **pcm; -- int samples; -+ while(!eos){ -+ int result=ogg_sync_pageout(&oy,&og); -+ if(result==0)break; /* need more data */ -+ if(result<0){ /* missing or corrupt data at this page position */ -+ fprintf(stderr,"Corrupt or missing data in bitstream; " -+ "continuing...\n"); -+ }else{ -+ ogg_stream_pagein(&os,&og); /* can safely ignore errors at -+ this point */ -+ while(1){ -+ result=ogg_stream_packetout(&os,&op); - -- if(vorbis_synthesis(&vb,&op)==0) /* test for success! */ -- vorbis_synthesis_blockin(&vd,&vb); -- /* -- -- **pcm is a multichannel float vector. In stereo, for -- example, pcm[0] is left, and pcm[1] is right. samples is -- the size of each channel. Convert the float values -- (-1.<=range<=1.) to whatever PCM format and write it out */ -- -- while((samples=vorbis_synthesis_pcmout(&vd,&pcm))>0){ -- int j; -- int clipflag=0; -- int bout=(samples0){ -+ int j; -+ int clipflag=0; -+ int bout=(samples32767){ -- val=32767; -- clipflag=1; -+ /* might as well guard against clipping */ -+ if(val>32767){ -+ val=32767; -+ clipflag=1; -+ } -+ if(val<-32768){ -+ val=-32768; -+ clipflag=1; -+ } -+ *ptr=val; -+ ptr+=vi.channels; - } -- if(val<-32768){ -- val=-32768; -- clipflag=1; -- } -- *ptr=val; -- ptr+=vi.channels; - } -- } -- -- if(clipflag) -- fprintf(stderr,"Clipping in frame %ld\n",(long)(vd.sequence)); -- -- -- fwrite(convbuffer,2*vi.channels,bout,stdout); -- -- vorbis_synthesis_read(&vd,bout); /* tell libvorbis how -- many samples we -- actually consumed */ -- } -+ -+ if(clipflag) -+ fprintf(stderr,"Clipping in frame %ld\n",(long)(vd.sequence)); -+ -+ -+ fwrite(convbuffer,2*vi.channels,bout,stdout); -+ -+ vorbis_synthesis_read(&vd,bout); /* tell libvorbis how -+ many samples we -+ actually consumed */ -+ } -+ } - } -+ if(ogg_page_eos(&og))eos=1; - } -- if(ogg_page_eos(&og))eos=1; - } -+ if(!eos){ -+ buffer=ogg_sync_buffer(&oy,4096); -+ bytes=fread(buffer,1,4096,stdin); -+ ogg_sync_wrote(&oy,bytes); -+ if(bytes==0)eos=1; -+ } - } -- if(!eos){ -- buffer=ogg_sync_buffer(&oy,4096); -- bytes=fread(buffer,1,4096,stdin); -- ogg_sync_wrote(&oy,bytes); -- if(bytes==0)eos=1; -- } -+ -+ /* ogg_page and ogg_packet structs always point to storage in -+ libvorbis. They're never freed or manipulated directly */ -+ -+ vorbis_block_clear(&vb); -+ vorbis_dsp_clear(&vd); -+ }else{ -+ fprintf(stderr,"Error: Corrupt header during playback initialization.\n"); - } -- -+ - /* clean up this logical bitstream; before exit we see if we're - followed by another [chained] */ -- -+ - ogg_stream_clear(&os); -- -- /* ogg_page and ogg_packet structs always point to storage in -- libvorbis. They're never freed or manipulated directly */ -- -- vorbis_block_clear(&vb); -- vorbis_dsp_clear(&vd); -- vorbis_comment_clear(&vc); -+ vorbis_comment_clear(&vc); - vorbis_info_clear(&vi); /* must be called last */ - } - diff --git a/sources b/sources index 95e1eba..40b84b8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7c6e409d7aa1fa8a5481dea571d5bde0 libvorbis-1.2.0.tar.bz2 +6a7086ee666b8c62e122d29d107f7bec libvorbis-1.2.2rc1.tar.bz2