Storage: make sure matrix is initialized before read
Change-Id: I967ab34c0f0430900b4be4424fa4493386c96c33
This commit is contained in:
parent
7bf2bec78f
commit
cb8564b17f
1 changed files with 1 additions and 0 deletions
|
@ -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++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue