src/nhttpd: fix segfault if logging on

Origin commit data
------------------
Branch: ni/coolstream
Commit: fe16513b4f
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-12-07 (Fri, 07 Dec 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-12-07 11:13:51 +01:00
parent 65d6e234ae
commit 66daad3ff4
3 changed files with 7 additions and 3 deletions

View File

@@ -65,6 +65,8 @@ bool CmAuth::CheckAuth(CyhookHandler *hh) {
// decode Base64 buffer to String
//-----------------------------------------------------------------------------
std::string CmAuth::decodeBase64(const char *b64buffer) {
if(b64buffer==NULL)
return "";
char *newString; //shorter then b64buffer
std::string result;
if ((newString = (char *) malloc(sizeof(char) * strlen(b64buffer) + 1))