summaryrefslogtreecommitdiffstats
path: root/src/net/tcp
diff options
context:
space:
mode:
authorMichael Brown2015-04-24 16:32:04 +0200
committerMichael Brown2015-04-24 16:32:04 +0200
commit1205721cbd1930d22b7adcb3211040c7152e3171 (patch)
treee3d7a1ff444a4ff0cea8ee38a9f4ef16eb323d31 /src/net/tcp
parent[base16] Add buffer size parameter to base16_encode() and base16_decode() (diff)
downloadipxe-1205721cbd1930d22b7adcb3211040c7152e3171.tar.gz
ipxe-1205721cbd1930d22b7adcb3211040c7152e3171.tar.xz
ipxe-1205721cbd1930d22b7adcb3211040c7152e3171.zip
[base64] Add buffer size parameter to base64_encode() and base64_decode()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/tcp')
-rw-r--r--src/net/tcp/httpcore.c3
-rw-r--r--src/net/tcp/iscsi.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/net/tcp/httpcore.c b/src/net/tcp/httpcore.c
index d94ab5f0..f14ce9a8 100644
--- a/src/net/tcp/httpcore.c
+++ b/src/net/tcp/httpcore.c
@@ -1081,7 +1081,8 @@ static char * http_basic_auth ( struct http_request *http ) {
snprintf ( user_pw, sizeof ( user_pw ), "%s:%s", user, password );
/* Base64-encode the "user:password" string */
- base64_encode ( ( void * ) user_pw, user_pw_len, user_pw_base64 );
+ base64_encode ( user_pw, user_pw_len, user_pw_base64,
+ sizeof ( user_pw_base64 ) );
/* Generate the authorisation string */
len = asprintf ( &auth, "Authorization: Basic %s\r\n",
diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c
index e553b214..0099bf5b 100644
--- a/src/net/tcp/iscsi.c
+++ b/src/net/tcp/iscsi.c
@@ -845,7 +845,7 @@ static int iscsi_large_binary_decode ( const char *encoded, uint8_t *raw,
case 'x' :
return base16_decode ( encoded, raw, len );
case 'b' :
- return base64_decode ( encoded, raw );
+ return base64_decode ( encoded, raw, len );
}
}