tolerate NULL mime type
authorChristian Grothoff <christian@grothoff.org>
Sun, 27 Jun 2010 13:51:51 +0000 (13:51 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 27 Jun 2010 13:51:51 +0000 (13:51 +0000)
src/util/container_meta_data.c

index 3f2d7a95c6ec9067317513fa7a9156f3df9caae1..039ba86ab2dfc4c26dca7a3194efced41aa99e3b 100644 (file)
@@ -585,8 +585,9 @@ GNUNET_CONTAINER_meta_data_get_thumbnail (const struct
   match = NULL;
   pos = md->items;
   while (NULL != pos)
-    {
-      if ( (0 == strncasecmp ("image/", pos->mime_type,
+    {      
+      if ( (NULL != pos->mime_type) && 
+          (0 == strncasecmp ("image/", pos->mime_type,
                              strlen("image/"))) &&
           (pos->format == EXTRACTOR_METAFORMAT_BINARY) )
        {