[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - wsd/FileServer.cpp

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Mon Nov 25 14:15:49 UTC 2019


 wsd/FileServer.cpp |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 596929869a298776c7d3017fd76c0e06eace191d
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Nov 17 22:40:00 2019 -0500
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Nov 25 15:15:29 2019 +0100

    wsd: check opendir return value
    
    Change-Id: I4c6f532f388b4664738c3b8a642d1b1f23f6a5a7
    Reviewed-on: https://gerrit.libreoffice.org/83050
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 6fb0c4767..cc4e3d40c 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -461,6 +461,8 @@ void FileServerRequestHandler::readDirToHash(const std::string &basePath, const
 
     LOG_TRC("Pre-reading directory: " << basePath << path);
     workingdir = opendir((basePath + path).c_str());
+    if (workingdir == nullptr)
+        return;
 
     while ((currentFile = readdir(workingdir)) != nullptr)
     {


More information about the Libreoffice-commits mailing list