From 1cbc163b11d6dbabfe7206fb2f9ddf650337dad6 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Fri, 23 Oct 2015 09:52:55 +0200 Subject: [PATCH] Fix off-by-one error (CPERLIN) CPERLIN is the chars per line without the line break chars (\r\n), at least would that match the description in RFC 2822. Actually, however, the max SHOULD line length (excluding line break chars) is 78 according to the RFC. Therefore it seems as if we should set CPERLIN to 78. (This is open to decide and to do.) --- uip/mhoutsbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c index ba88319..87e7943 100644 --- a/uip/mhoutsbr.c +++ b/uip/mhoutsbr.c @@ -228,7 +228,7 @@ writeQuoted(CT ct, FILE *out) n = 0; } for (; *cp; cp++) { - if (n > CPERLIN - 3) { + if (n + 1 >= CPERLIN) { fputs("=\n", out); n = 0; } -- 1.7.10.4