fix a segfault error by testing sp != NULL
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -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 | { | ... | ... |
-
Please register or sign in to post a comment