# HG changeset patch # User Adam Chlipala # Date 1451157312 18000 # Node ID 0420bfe96dda81fd939f6b659d0ec90faaf4da8d # Parent 9ab026c81a2214b4a44972f4662bb07e212ddc63 Fix off-by-one memory allocation error diff -r 9ab026c81a22 -r 0420bfe96dda mail.c --- a/mail.c Wed Dec 31 08:00:42 2014 -0500 +++ b/mail.c Sat Dec 26 14:15:12 2015 -0500 @@ -75,7 +75,7 @@ address(ctx, s); if (h2->to) { - uw_Basis_string all = uw_malloc(ctx, strlen(h2->to) + 1 + strlen(s)); + uw_Basis_string all = uw_malloc(ctx, strlen(h2->to) + 2 + strlen(s)); sprintf(all, "%s,%s", h2->to, s); h2->to = all; } else