mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
With the current implementation of CString::Base64Decode the following
code would fail (meaning b would be false):
CString t = "some very long string ...";
bool b = (t == t.Base64Encode_n(true).Base64Decode_n());
The same code without wrapping the base64 output would give b = true
as expected.
The new implementation removes all new lines before decoding so
decoding a wrapped base64 text gives the expected result.
Furthermore replaced malloc and free with new and delete and removed
the check for p in CString::Base64Encode since new will throw if it
failed.
The changes don't affect any existing code.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1410 726aef4b-f618-498e-8847-2d620e286838
25 KiB
25 KiB