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

New commits:
commit 596929869a298776c7d3017fd76c0e06eace191d
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Sun Nov 17 22:40:00 2019 -0500
Commit:     Michael Meeks <michael.me...@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.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@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)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to