* Missing initialisation of upload status caused a seg fault
* Missing data termination caused corrupt data to be uploaded
* Data verification should be performed in <upload> element
* Added missing recipient list cleanup
MAIL FROM:<sender@example.com>\r
RCPT TO:<recipient@example.com>\r
DATA\r
+QUIT\r
+</protocol>
+<upload>
From: different\r
To: another\r
\r
..\r
\r
body\r
-</protocol>
+.\r
+</upload>
</verify>
</testcase>
#define FROM "<sender@example.com>"
static const char *payload_text[] = {
-"From: different\r\n",
-"To: another\r\n",
-"\r\n",
-"\r\n",
-".\r\n",
-".\r\n",
-"\r\n",
-".\r\n",
-"\r\n",
-"body"
+ "From: different\r\n",
+ "To: another\r\n",
+ "\r\n",
+ "\r\n",
+ ".\r\n",
+ ".\r\n",
+ "\r\n",
+ ".\r\n",
+ "\r\n",
+ "body",
+ NULL
};
struct upload_status {
test_cleanup:
+ curl_slist_free_all(rcpt_list);
curl_easy_cleanup(curl);
curl_global_cleanup();