[xiph-commits] r3615 - liboggz/trunk/src/tools/oggz-chop

conrad at svn.annodex.net conrad at svn.annodex.net
Sun Jun 29 03:22:44 PDT 2008


Author: conrad
Date: 2008-06-29 03:22:43 -0700 (Sun, 29 Jun 2008)
New Revision: 3615

Modified:
   liboggz/trunk/src/tools/oggz-chop/oggz-chop.c
Log:
oggz-chop: when updating a fisbone, actually check that the skeleton
packet we are reading is a fisbone ...
Fixes crash reported by j^


Modified: liboggz/trunk/src/tools/oggz-chop/oggz-chop.c
===================================================================
--- liboggz/trunk/src/tools/oggz-chop/oggz-chop.c	2008-06-29 09:24:16 UTC (rev 3614)
+++ liboggz/trunk/src/tools/oggz-chop/oggz-chop.c	2008-06-29 10:22:43 UTC (rev 3615)
@@ -509,10 +509,12 @@
 
   content_type = oggz_stream_get_content(oggz, serialno);
   if(content_type == OGGZ_CONTENT_SKELETON) {
-    fisbone_from_ogg_page (og, &fisbone);
-    ts = oggz_table_lookup (state->tracks, fisbone.serial_no);
-    ts->fisbone.current_header_size = fisbone.current_header_size;
-    ts->fisbone.message_header_fields = fisbone.message_header_fields;
+    if (fisbone_from_ogg_page (og, &fisbone) != -1) {
+      if ((ts = oggz_table_lookup (state->tracks, fisbone.serial_no)) != NULL) {
+        ts->fisbone.current_header_size = fisbone.current_header_size;
+        ts->fisbone.message_header_fields = fisbone.message_header_fields;
+      }
+    }
   } else {
     ts = oggz_table_lookup (state->tracks, serialno);
     ts->headers_remaining -= ogg_page_packets (OGG_PAGE_CONST(og));



More information about the commits mailing list