Webcit coredumping when body of message is blank
authorHarlow Solutions <citadel@harlowsolutions.com>
Fri, 16 Jun 2023 04:07:30 +0000 (00:07 -0400)
committerHarlow Solutions <citadel@harlowsolutions.com>
Fri, 16 Jun 2023 04:07:30 +0000 (00:07 -0400)
webcit/messages.c post_mime_to_server(): Skip output processsing if msgtext empty

webcit/messages.c

index 78533171248a814fd0f665e47ed1e360030b9706..0e6b76d843bf949f0699884da91b3c71410cb3a5 100644 (file)
@@ -918,7 +918,9 @@ void post_mime_to_server(void) {
        serv_puts("Content-Transfer-Encoding: quoted-printable");
        serv_puts("");
        serv_puts("<html><body>\r\n");
-       text_to_server_qp(sbstr("msgtext"));    /* Transmit message in quoted-printable encoding */
+       if (havebstr("msgtext")) {
+               text_to_server_qp(sbstr("msgtext"));    /* Transmit message in quoted-printable encoding */
+       }
        serv_puts("</body></html>\r\n");
 
        if (include_text_alt) {