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)
text_plain = 1;
}
while (*sp && isspace ((unsigned)*sp)) sp++;
while (sp != NULL && *sp && isspace ((unsigned)*sp)) sp++;
/* body parameter parenthesized list: Content-type attributes */
if (*sp || text_plain)
if ((sp != NULL && *sp) || text_plain)
{
util_send (" (");
{
......