diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-01-20 01:31:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-01-20 01:31:39 +0000 |
commit | 1ae17617bd8cb2d76ec211de303016c5a74f6c29 (patch) | |
tree | c7d6a02695fad2c5437402699dd1e70d4b1a4e8d | |
parent | c7d21fbd347633d602d10bff760f1a8b99f03778 (diff) |
Add missing va_end() calls, patch sent to sendmail folks.
-rw-r--r-- | gnu/usr.sbin/sendmail/libmilter/smfi.c | 8 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/libsm/strl.c | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gnu/usr.sbin/sendmail/libmilter/smfi.c b/gnu/usr.sbin/sendmail/libmilter/smfi.c index 4a4132f083e..da5c5c58ef4 100644 --- a/gnu/usr.sbin/sendmail/libmilter/smfi.c +++ b/gnu/usr.sbin/sendmail/libmilter/smfi.c @@ -430,18 +430,20 @@ smfi_setmlreply(ctx, rcode, xcode, va_alist) tl = strlen(txt); if (tl > MAXREPLYLEN) - return MI_FAILURE; + break; /* this text, reply codes, \r\n */ len += tl + 2 + rlen; if (++args > MAXREPLIES) - return MI_FAILURE; + break; /* XXX check also for unprintable chars? */ if (strpbrk(txt, "\r\n") != NULL) - return MI_FAILURE; + break; } SM_VA_END(ap); + if (txt != NULL) + return MI_FAILURE; /* trailing '\0' */ ++len; diff --git a/gnu/usr.sbin/sendmail/libsm/strl.c b/gnu/usr.sbin/sendmail/libsm/strl.c index 21c31464131..86947ddb034 100644 --- a/gnu/usr.sbin/sendmail/libsm/strl.c +++ b/gnu/usr.sbin/sendmail/libsm/strl.c @@ -229,6 +229,7 @@ sm_strlcpyn(dst, len, n, va_alist) i = 0; while (n-- > 0) i += strlen(SM_VA_ARG(ap, char *)); + SM_VA_END(ap); return i; } @@ -251,9 +252,11 @@ sm_strlcpyn(dst, len, n, va_alist) j += strlen(str + i); while (n-- > 0) j += strlen(SM_VA_ARG(ap, char *)); + SM_VA_END(ap); return j; } } + SM_VA_END(ap); dst[j] = '\0'; /* terminate dst; there is space since j < len */ return j; |