Hello,
i have found an off-by-one error which can be fixed with the diff
below.  It is already on the [master] branch.  I'm awaiting
a response of the bug reporter (again: [1]), if i get positive
feedback i really think i'm gonna release a new minor.
Ciao,

--steffen
---
 send.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/send.c b/send.c
index f45831d..c10835f 100644
--- a/send.c
+++ b/send.c
@@ -205,8 +205,8 @@ _print_part_info(struct str *out, struct mimepart *mip,
 	/* Max. 24 */
 	if (is_ign("content-type", 12, doign)) {
 		out->s = mip->m_ct_type_plain;
-		out->l = strlen(out->s) + 1;
-		ct.s = ac_alloc(2 + out->l);
+		out->l = strlen(out->s);
+		ct.s = ac_alloc(out->l + 2 +1);
 		ct.s[0] = ',';
 		ct.s[1] = ' ';
 		ct.l = 2;
@@ -220,7 +220,7 @@ _print_part_info(struct str *out, struct mimepart *mip,
 			out->l = smin(out->l, 24);
 		memcpy(ct.s + ct.l, out->s, out->l);
 		ct.l += out->l;
-		ct.s[ct.l] = 0;
+		ct.s[ct.l] = '\0';
 	}
 
 	/* Max. 27 */
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
S-nail-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/s-nail-users

Reply via email to