aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_http.c2
-rw-r--r--plugins/check_smtp.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 02754021..151eacac 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -764,7 +764,7 @@ check_http (void)
/* optionally send the authentication info */
if (strlen(user_auth)) {
- auth = base64 (user_auth, strlen (user_auth));
+ base64_encode_alloc (user_auth, strlen (user_auth), &auth);
asprintf (&buf, "%sAuthorization: Basic %s\r\n", buf, auth);
}
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index d3e4f42e..3310bceb 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -366,7 +366,8 @@ main (int argc, char **argv)
}
/* encode authuser with base64 */
- abuf = base64 (authuser, strlen(authuser));
+ base64_encode_alloc (authuser, strlen(authuser), &abuf);
+ /* FIXME: abuf shouldn't have enough space to strcat a '\r\n' into it. */
strcat (abuf, "\r\n");
my_send(abuf, strlen(abuf));
if (verbose)
@@ -386,7 +387,8 @@ main (int argc, char **argv)
break;
}
/* encode authpass with base64 */
- abuf = base64 (authpass, strlen(authpass));
+ base64_encode_alloc (authpass, strlen(authpass), &abuf);
+ /* FIXME: abuf shouldn't have enough space to strcat a '\r\n' into it. */
strcat (abuf, "\r\n");
my_send(abuf, strlen(abuf));
if (verbose) {