mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-10-01 22:24:55 +02:00
Ignore base64 padding for strings that are supposed to be unpadded.
This commit is contained in:
+5
-2
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user