[xiph-commits] r13772 - icecast/trunk/ices0/src

moritz at svn.xiph.org moritz at svn.xiph.org
Fri Sep 7 12:36:15 PDT 2007


Author: moritz
Date: 2007-09-07 12:36:15 -0700 (Fri, 07 Sep 2007)
New Revision: 13772

Modified:
   icecast/trunk/ices0/src/in_vorbis.c
Log:
Do not crash badly when ov_read() returns an error that is not OV_HOLE.


Modified: icecast/trunk/ices0/src/in_vorbis.c
===================================================================
--- icecast/trunk/ices0/src/in_vorbis.c	2007-09-07 19:31:57 UTC (rev 13771)
+++ icecast/trunk/ices0/src/in_vorbis.c	2007-09-07 19:36:15 UTC (rev 13772)
@@ -150,6 +150,9 @@
 			  sizeof (vorbis_data->buf), ICES_OV_BE, SAMPLESIZE, 1, &link)) <= 0) {
 	if (len == OV_HOLE) {
 	  ices_log_error ("Skipping bad vorbis data");
+	} else if (len < 0) {
+	  ices_log_error ("ov_read returned an error: %d", len);
+	  return 0;
 	} else
 	  return len;
       }



More information about the commits mailing list