Correct an uninitialized value

This commit is contained in:
Ben RUBSON 2017-10-11 07:59:27 +02:00 committed by GitHub
parent 07f64d9e21
commit 89cb000aba

View File

@ -186,7 +186,7 @@ const ConfigVar &operator>>(const ConfigVar &src, std::string &result) {
int readLen; int readLen;
unsigned char tmpBuf[32]; unsigned char tmpBuf[32] = {};
if (length > (int)sizeof(tmpBuf)) { if (length > (int)sizeof(tmpBuf)) {
auto *ptr = new unsigned char[length]; auto *ptr = new unsigned char[length];
readLen = src.read(ptr, length); readLen = src.read(ptr, length);