mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 21:11:03 +03:00
[base64] Add buffer size parameter to base64_encode() and base64_decode()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user