]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
* zero structs before handing them to getpeername() to silence valgrind.
[citadel.git] / citadel / msgbase.c
index f6d7018b2279cdd0a7fa37625287122281949aea..90d62a53b2f77f6754fd8294798c76ddfc5a590f 100644 (file)
@@ -3185,6 +3185,7 @@ struct recptypes *validate_recipients(char *supplied_recipients) {
                mailtype = alias(this_recp);
                mailtype = alias(this_recp);
                mailtype = alias(this_recp);
+               j = 0;
                for (j=0; !IsEmptyStr(&this_recp[j]); ++j) {
                        if (this_recp[j]=='_') {
                                this_recp_cooked[j] = ' ';
@@ -3193,6 +3194,7 @@ struct recptypes *validate_recipients(char *supplied_recipients) {
                                this_recp_cooked[j] = this_recp[j];
                        }
                }
+               this_recp_cooked[j] = '\0';
                invalid = 0;
                switch(mailtype) {
                        case MES_LOCAL: