* fix off by one while copying email headers
[citadel.git] / citadel / internet_addressing.c
index 14439a6abce4d3b8fa8a922c6b216406492a4a1a..ce8337f859bde64855d9ba0799f15937755f9dab 100644 (file)
@@ -574,7 +574,7 @@ int convert_field(struct CtdlMessage *msg, const char *beg, const char *end) {
        * ( key + (colonpos - beg) ) = '\0';
        value = &key[(colonpos - beg) + 1];
        unfold_rfc822_field(&value, &valueend);
-       valuelen = valueend - value;
+       valuelen = valueend - value + 1;
 
        /*
         * Here's the big rfc822-to-citadel loop.