Commit 393b8b60 393b8b604a17c77720c0afaafb7f17a012a66a76 by Jakob Kaivo

fix a segfault error by testing sp != NULL

1 parent 01a9e9fe
...@@ -813,9 +813,9 @@ bodystructure (message_t msg, int extension) ...@@ -813,9 +813,9 @@ bodystructure (message_t msg, int extension)
813 text_plain = 1; 813 text_plain = 1;
814 } 814 }
815 815
816 while (*sp && isspace ((unsigned)*sp)) sp++; 816 while (sp != NULL && *sp && isspace ((unsigned)*sp)) sp++;
817 /* body parameter parenthesized list: Content-type attributes */ 817 /* body parameter parenthesized list: Content-type attributes */
818 if (*sp || text_plain) 818 if ((sp != NULL && *sp) || text_plain)
819 { 819 {
820 util_send (" ("); 820 util_send (" (");
821 { 821 {
......