mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Fix decoding of base64. We got the length wrong when the result was not
an exact multiple of 3. I also wrote a torture test and it survived some minutes of random stuff coded/decoded up to 16 MB data. But that would be a bit too embarassing to commit... :-) Volker
This commit is contained in:
parent
aca07f33a2
commit
6d22f0d8c3
@ -1838,6 +1838,8 @@ DATA_BLOB base64_decode_data_blob(const char *s)
|
||||
s++; i++;
|
||||
}
|
||||
|
||||
if (*s == '=') n -= 1;
|
||||
|
||||
/* fix up length */
|
||||
decoded.length = n;
|
||||
return decoded;
|
||||
|
Loading…
Reference in New Issue
Block a user