fix a segfault happening when conv_unmime_header fails
authorColin Leroy <colin@colino.net>
Fri, 11 Oct 2002 18:10:52 +0000 (18:10 +0000)
committerColin Leroy <colin@colino.net>
Fri, 11 Oct 2002 18:10:52 +0000 (18:10 +0000)
ChangeLog.claws
configure.in
src/procheader.c

index af9f4854c82090c7b95ae0ec7d6a31a0b9f01bd5..edf38563ecd2a8f999f0b163507952821a9a9a44 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-11 [colin]     0.8.5claws15 
+
+       * src/procheader.c
+               fix a segfault that happens if conv_unmime_header
+               fails (should be better to find out why it fails)
+
 2002-10-11 [christoph] 0.8.5claws14
 
        * src/summaryview.c
index 051f904e5bdbddcf622d85b6c03f1316c4254f9a..ede6cde135e8fe542e36bf273c440b5892e938af 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws14
+EXTRA_VERSION=claws15
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 871f615af09ad6da8d513419d03e4d494e0f4b79..abdfc9629af18e16fa535831f3d82f2b53e40dbc 100644 (file)
@@ -387,6 +387,7 @@ Header * procheader_parse_header(gchar * buf)
        gchar tmp[BUFFSIZE];
        gchar *p = buf;
        Header * header;
+       gchar *backup;
 
        if ((*buf == ':') || (*buf == ' '))
                return NULL;
@@ -398,7 +399,10 @@ Header * procheader_parse_header(gchar * buf)
                        p++;
                        while (*p == ' ' || *p == '\t') p++;
                        conv_unmime_header(tmp, sizeof(tmp), p, NULL);
-                       header->body = g_strdup(tmp);
+                       if(tmp == NULL) 
+                               header->body = g_strdup(p);
+                       else    
+                               header->body = g_strdup(tmp);
                        return header;
                }
        }