Index: gst-libs/gst/tag/gsttagdemux.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst-libs/gst/tag/gsttagdemux.c,v
retrieving revision 1.6
diff -u -r1.6 gsttagdemux.c
--- gst-libs/gst/tag/gsttagdemux.c	27 Feb 2008 10:23:27 -0000	1.6
+++ gst-libs/gst/tag/gsttagdemux.c	20 Sep 2008 00:04:20 -0000
@@ -1151,6 +1151,14 @@
     demux->priv->send_tag_event = TRUE;
   }
 
+  if (demux->priv->upstream_size <= 
+          demux->priv->strip_start + demux->priv->strip_end)
+  {
+    /* There was no data (probably due to a truncated file) */
+    GST_DEBUG_OBJECT (demux, "No data in file");
+    return FALSE;
+  }
+
   /* 3 - Do typefinding on data */
   caps = gst_type_find_helper_get_range (GST_OBJECT (demux),
       (GstTypeFindHelperGetRangeFunction) gst_tag_demux_read_range,
