[Libreoffice-commits] online.git: wsd/Storage.cpp

Miklos Vajna vmiklos at collabora.co.uk
Thu Dec 8 08:34:20 UTC 2016


 wsd/Storage.cpp |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit cb8564b17f7767b56f2a57c8c5a064ad86928fad
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Dec 8 09:33:24 2016 +0100

    Storage: make sure matrix is initialized before read
    
    Change-Id: I967ab34c0f0430900b4be4424fa4493386c96c33

diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 21800ae..a2ca75b 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -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++)
     {


More information about the Libreoffice-commits mailing list