[xiph-commits] r13210 - trunk/vorbis/lib

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Jul 2 15:51:10 PDT 2007


Author: xiphmont
Date: 2007-07-02 15:51:10 -0700 (Mon, 02 Jul 2007)
New Revision: 13210

Modified:
   trunk/vorbis/lib/vorbisfile.c
Log:
Although bug 552 was complaining about behavior that was illegal
anyway, added an additional proofing check to vorbisfile to aid a
developer figuring out what he's doing wrong.



Modified: trunk/vorbis/lib/vorbisfile.c
===================================================================
--- trunk/vorbis/lib/vorbisfile.c	2007-06-30 05:55:59 UTC (rev 13209)
+++ trunk/vorbis/lib/vorbisfile.c	2007-07-02 22:51:10 UTC (rev 13210)
@@ -414,7 +414,10 @@
   /* we can seek, so set out learning all about this file */
   (vf->callbacks.seek_func)(vf->datasource,0,SEEK_END);
   vf->offset=vf->end=(vf->callbacks.tell_func)(vf->datasource);
-  
+
+  /* If seek_func is implemented, tell_func must also be implemented */
+  if(vf->end==-1) return(OV_EINVAL);
+
   /* We get the offset for the last page of the physical bitstream.
      Most OggVorbis files will contain a single logical bitstream */
   end=_get_prev_page(vf,&og);



More information about the commits mailing list