aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http.c b/lib/http.c
index 09e1fc4c2..dade9601f 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -127,7 +127,7 @@ static CURLcode Curl_output_basic(struct connectdata *conn)
sprintf(data->state.buffer, "%s:%s", conn->user, conn->passwd);
if(Curl_base64_encode(data->state.buffer, strlen(data->state.buffer),
- &authorization) >= 0) {
+ &authorization) > 0) {
if(conn->allocptr.userpwd)
free(conn->allocptr.userpwd);
conn->allocptr.userpwd = aprintf( "Authorization: Basic %s\015\012",
@@ -147,7 +147,7 @@ static CURLcode Curl_output_basic_proxy(struct connectdata *conn)
sprintf(data->state.buffer, "%s:%s",
conn->proxyuser, conn->proxypasswd);
if(Curl_base64_encode(data->state.buffer, strlen(data->state.buffer),
- &authorization) >= 0) {
+ &authorization) > 0) {
Curl_safefree(conn->allocptr.proxyuserpwd);
conn->allocptr.proxyuserpwd =
aprintf("Proxy-authorization: Basic %s\015\012", authorization);