[Commits] [SCM] claws branch, master, updated. 3.9.1-14-g6b97861
mones at claws-mail.org
mones at claws-mail.org
Fri May 24 14:41:52 CEST 2013
The branch master of project "claws" (Claws Mail) has been updated
via 6b978617931b7116397c6c625a26dc638154dd28 (commit)
from 94ed99e1acdf6a07c6cb3c01f764ab9f6e97fa77 (commit)
- Log -----------------------------------------------------------------
commit 6b978617931b7116397c6c625a26dc638154dd28
Author: Ricardo Mones <ricardo at mones.org>
Date: Fri May 24 14:38:28 2013 +0200
Remove every control char after colon
The extraheaderrc format doesn't allow data after the header
colon. Other OSes may insert extra characters other than \n,
so, remove them all.
diff --git a/src/compose.c b/src/compose.c
index 77370de..7b2e6fa 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -6625,9 +6625,9 @@ void compose_add_extra_header_entries(GtkListStore *model)
goto extra_headers_done;
}
while (fgets(buf, BUFFSIZE, exh) != NULL) {
- lastc = strlen(buf) - 1; /* remove trailing \n */
- buf[lastc] = (buf[lastc] == '\n')? '\0': buf[lastc];
- --lastc;
+ lastc = strlen(buf) - 1; /* remove trailing control chars */
+ while (lastc >= 0 && buf[lastc] != ':')
+ buf[lastc--] = '\0';
if (lastc > 0 && buf[0] != '#' && buf[lastc] == ':') {
buf[lastc] = '\0'; /* remove trailing : for comparison */
if (custom_header_is_allowed(buf)) {
-----------------------------------------------------------------------
Summary of changes:
src/compose.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list