mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Fixed Base64Decode() to be binary safe
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@512 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "String.h"
|
||||
#include "FileUtils.h"
|
||||
#include "MD5.h"
|
||||
#include "main.h"
|
||||
|
||||
const char* g_szHTMLescapes[256] = {
|
||||
"�", 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-9
|
||||
@@ -502,7 +503,8 @@ unsigned long CString::Base64Decode(CString& sRet) const {
|
||||
|
||||
*p = '\0';
|
||||
unsigned long uRet = p - out;
|
||||
sRet = out;
|
||||
sRet.clear();
|
||||
sRet.append(out, uRet);
|
||||
free(out);
|
||||
|
||||
return uRet;
|
||||
|
||||
Reference in New Issue
Block a user