mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
Ignore base64 padding for strings that are supposed to be unpadded.
This commit is contained in:
parent
852a2e1105
commit
39f6071854
@ -735,9 +735,12 @@ static int sldns_b64_pton_base(char const *src, size_t srcsize, uint8_t *target,
|
||||
d = 63;
|
||||
else if(base64url && d == '_')
|
||||
d = 63;
|
||||
else if(!base64url && d == '=')
|
||||
else if(d == '=') {
|
||||
if(!check_padding)
|
||||
continue;
|
||||
d = 64;
|
||||
else continue;
|
||||
} else continue;
|
||||
|
||||
in[incount++] = (uint8_t)d;
|
||||
/* work on block of 4, unless padding is not used and there are
|
||||
* less than 4 chars left */
|
||||
|
Loading…
Reference in New Issue
Block a user