[Libreoffice-commits] online.git: bundled/include

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 29 09:50:18 UTC 2018


 bundled/include/LibreOfficeKit/LibreOfficeKitInit.h |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 790f3aa5c5a4ca1cfdda41c255a18401c5ded40d
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Oct 25 15:39:50 2018 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Oct 29 11:49:11 2018 +0200

    Verify that we are actually passed a URL, not a pathname
    
    Sure, the test could be even more strict and actually do a
    case-insensitive check for an initial "file:" or
    "vnd.sun.star.pathname:".
    
    Change-Id: Ic252aeccdec708138530075d1f38fa348d1e469e

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h b/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
index ce5054ac9..3251ade7d 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -285,6 +285,15 @@ static LibreOfficeKit *lok_init_2( const char *install_path,  const char *user_p
         return pSym( install_path );
     }
 
+    if (user_profile_url != NULL && user_profile_url[0] == '/')
+    {
+        // It should be either a file: URL or a vnd.sun.star.pathname: URL.
+        fprintf( stderr, "second parameter to lok_init_2 '%s' should be a URL, not a pathname\n", user_profile_url );
+        lok_dlclose( dlhandle );
+        free( imp_lib );
+        return NULL;
+    }
+
     free( imp_lib );
     // dlhandle is "leaked"
     // coverity[leaked_storage]


More information about the Libreoffice-commits mailing list