Storage: make sure matrix is initialized before read

Change-Id: I967ab34c0f0430900b4be4424fa4493386c96c33
This commit is contained in:
Miklos Vajna 2016-12-08 09:33:24 +01:00
parent 7bf2bec78f
commit cb8564b17f

View file

@ -283,6 +283,7 @@ Poco::Net::HTTPClientSession* getHTTPClientSession(const Poco::URI& uri)
int getLevenshteinDist(const std::string& string1, const std::string& string2) {
int matrix[string1.size() + 1][string2.size() + 1];
std::memset(matrix, 0, sizeof(matrix[0][0]) * (string1.size() + 1) * (string2.size() + 1));
for (size_t i = 0; i < string1.size() + 1; i++)
{