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]);
|
sprintf(output + 2 * i, "%02x", bytes[i]);
|
||||||
|
|
||||||
String result = output;
|
String result = output;
|
||||||
|
delete [] bytes;
|
||||||
delete [] output;
|
delete [] output;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -61,6 +61,7 @@ String Base64::Decode(const String& input)
|
||||||
|
|
||||||
String ret = String(outbuf, outbuf + len);
|
String ret = String(outbuf, outbuf + len);
|
||||||
BIO_free_all(bio64);
|
BIO_free_all(bio64);
|
||||||
|
delete [] outbuf;
|
||||||
|
|
||||||
if (ret.IsEmpty() && !input.IsEmpty())
|
if (ret.IsEmpty() && !input.IsEmpty())
|
||||||
throw std::invalid_argument("Not a valid base64 string");
|
throw std::invalid_argument("Not a valid base64 string");
|
||||||
|
|
Loading…
Reference in New Issue