Fix segfault when mimeinfo doesn't have a
authorColin Leroy <colin@colino.net>
Tue, 24 Sep 2002 15:22:59 +0000 (15:22 +0000)
committerColin Leroy <colin@colino.net>
Tue, 24 Sep 2002 15:22:59 +0000 (15:22 +0000)
content_type.

ChangeLog.claws
configure.in
src/procmime.c

index 8fa8e19..98d71d9 100644 (file)
@@ -1,4 +1,10 @@
-2002-09-25 [colin]     0.8.3claws19
+2002-09-24 [colin]     0.8.3claws20
+
+       * src/procmime.c
+               Fix segfault when mimeinfo doesn't have a 
+               content_type. 
+
+2002-09-24 [colin]     0.8.3claws19
 
        * src/prefs_common.[ch]
                Add a preference to display send dialog or not
index 1624894..594666b 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws19
+EXTRA_VERSION=claws20
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 64bbcf2..ad7011f 100644 (file)
@@ -404,7 +404,8 @@ void procmime_scan_content_type(MimeInfo *mimeinfo, const gchar *content_type)
                                conv_unmime_header(tmp, len, value, NULL);
                                g_free(mimeinfo->name);
                                /*pgp signatures should NOT have a name */
-                               if (strcasecmp(mimeinfo->content_type, "application/pgp-signature"))
+                               if (mimeinfo->content_type 
+                               &&  strcasecmp(mimeinfo->content_type, "application/pgp-signature"))
                                        mimeinfo->name = g_strdup(tmp);
                        } else if (!strcasecmp(attr, "boundary"))
                                mimeinfo->boundary = g_strdup(value);
@@ -470,7 +471,8 @@ void procmime_scan_content_disposition(MimeInfo *mimeinfo,
                                conv_unmime_header(tmp, len, value, NULL);
                                g_free(mimeinfo->filename);
                                /*pgp signatures should NOT have a name */
-                               if (strcasecmp(mimeinfo->content_type, "application/pgp-signature"))
+                               if (mimeinfo->content_type 
+                               &&  strcasecmp(mimeinfo->content_type, "application/pgp-signature"))
                                        mimeinfo->filename = g_strdup(tmp);
                                break;
                        }
@@ -503,7 +505,8 @@ void procmime_scan_content_description(MimeInfo *mimeinfo,
        conv_unmime_header(tmp, blen, buf, NULL);
        g_free(mimeinfo->name);
        /*pgp signatures should NOT have a name */
-       if (strcasecmp(mimeinfo->content_type, "application/pgp-signature"))
+       if (mimeinfo->content_type 
+       &&  strcasecmp(mimeinfo->content_type, "application/pgp-signature"))
                mimeinfo->name = g_strdup(tmp);
 }