From b3c3f1890805598642aa44ae71c336f7800298df Mon Sep 17 00:00:00 2001 From: Muhammad Moinur Rahman Date: Mon, 8 Jun 2020 16:23:08 +0000 Subject: mail/dbmail: Update version 3.2.3=>3.2.4 - Migrate to Github PR: 247084 Submitted by: fluffy Relnotes: https://github.com/dbmail/dbmail/commit/c9f8fee139215aba52071f1c2ac268e282b0de18 --- .../patch-0004-prevent-assertion-in-p_string_erase | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 mail/dbmail/files/patch-0004-prevent-assertion-in-p_string_erase (limited to 'mail/dbmail/files/patch-0004-prevent-assertion-in-p_string_erase') diff --git a/mail/dbmail/files/patch-0004-prevent-assertion-in-p_string_erase b/mail/dbmail/files/patch-0004-prevent-assertion-in-p_string_erase deleted file mode 100644 index dcef53496196..000000000000 --- a/mail/dbmail/files/patch-0004-prevent-assertion-in-p_string_erase +++ /dev/null @@ -1,41 +0,0 @@ -From b6f28ffa54e6533fd0d8676248d0c9bc6d4bd859 Mon Sep 17 00:00:00 2001 -From: Paul J Stevens -Date: Sun, 10 Jan 2016 20:01:31 +0100 -Subject: [PATCH 04/33] prevent assertion in p_string_erase - ---- - src/dm_imapsession.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git src/dm_imapsession.c src/dm_imapsession.c -index dbf1834..67eae60 100644 ---- src/dm_imapsession.c -+++ src/dm_imapsession.c -@@ -870,19 +870,20 @@ static void _imap_send_part(ImapSession *self, GMimeObject *part, body_fetch *bo - } else { - char *tmp = imap_get_logical_part(part,type); - String_T str = p_string_new(self->pool, tmp); -+ size_t len = p_string_len(str); - g_free(tmp); - -- if (p_string_len(str) < 1) { -+ if (len < 1) { - dbmail_imap_session_buff_printf(self, "] NIL"); - } else { - uint64_t cnt = 0; - if (bodyfetch->octetcnt > 0) { -- cnt = get_dumpsize(bodyfetch, p_string_len(str)); -+ cnt = get_dumpsize(bodyfetch, len); - dbmail_imap_session_buff_printf(self, "]<%" PRIu64 "> {%" PRIu64 "}\r\n", bodyfetch->octetstart, cnt); -- p_string_erase(str,0,bodyfetch->octetstart); -+ p_string_erase(str,0,min(bodyfetch->octetstart,len)); - p_string_truncate(str,cnt); - } else { -- dbmail_imap_session_buff_printf(self, "] {%" PRIu64 "}\r\n", p_string_len(str)); -+ dbmail_imap_session_buff_printf(self, "] {%" PRIu64 "}\r\n", len); - } - dbmail_imap_session_buff_printf(self,"%s", p_string_str(str)); - } --- -2.10.1 (Apple Git-78) - -- cgit v1.2.3