mirror of https://github.com/Icinga/icinga2.git
parent
46000497cf
commit
cb70d97dcf
|
@ -561,6 +561,7 @@ String RandomString(int length)
|
|||
sprintf(output + 2 * i, "%02x", bytes[i]);
|
||||
|
||||
String result = output;
|
||||
delete [] bytes;
|
||||
delete [] output;
|
||||
|
||||
return result;
|
||||
|
|
|
@ -39,7 +39,7 @@ String Base64::Encode(const String& input)
|
|||
|
||||
String ret = String(outbuf, outbuf + len);
|
||||
BIO_free_all(bio64);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,8 @@ String Base64::Decode(const String& input)
|
|||
|
||||
String ret = String(outbuf, outbuf + len);
|
||||
BIO_free_all(bio64);
|
||||
|
||||
delete [] outbuf;
|
||||
|
||||
if (ret.IsEmpty() && !input.IsEmpty())
|
||||
throw std::invalid_argument("Not a valid base64 string");
|
||||
|
||||
|
|
Loading…
Reference in New Issue