[Libreoffice-commits] online.git: loolwsd/TileCache.cpp

Tor Lillqvist tml at collabora.com
Wed Sep 21 14:38:56 UTC 2016


 loolwsd/TileCache.cpp |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 299a57399670ded9ea5bfb1ca2b7601f269d3855
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Sep 21 17:38:23 2016 +0300

    Fix heap-use-after-free detectec by Clang's AddressSanitizer

diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index 416543e..6a2053f 100644
--- a/loolwsd/TileCache.cpp
+++ b/loolwsd/TileCache.cpp
@@ -491,13 +491,11 @@ std::string TileCache::cancelTiles(const std::shared_ptr<ClientSession> &subscri
                 // No other subscriber, remove it from the render queue.
                 oss << it->second->getVersion() << ',';
                 it = _tilesBeingRendered.erase(it);
+                continue;
             }
         }
 
-        if (!subscribers.empty())
-        {
-            ++it;
-        }
+        ++it;
     }
 
     const auto canceltiles = oss.str();


More information about the Libreoffice-commits mailing list