summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-01-18 13:19:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-01-18 16:55:04 +0100
commit2fcba16dc48ed7c0a507c18731a41a99f485ee46 (patch)
tree09094217f27db91e14328ccf312b0ce714894eeb /desktop
parent36e8d5d137260decabb7d2436fff2d3a93278f9d (diff)
Never pass -env: arguments across OfficeIPC connection
Change-Id: I1874ad0542bc8dcbe9ec588599a054030fd5d7d8
Diffstat (limited to 'desktop')
-rw-r--r--desktop/unx/source/start.c5
-rw-r--r--desktop/win32/source/officeloader/officeloader.cxx8
2 files changed, 10 insertions, 3 deletions
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 0e32c590f9de..c6b43395f9b5 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -45,6 +45,7 @@
#include <osl/thread.h>
#include <rtl/bootstrap.h>
#include <rtl/digest.h>
+#include <rtl/process.h>
#include <rtl/ustrbuf.h>
#include <sal/main.h>
@@ -454,7 +455,7 @@ send_args( int fd, rtl_uString *pCwdPath )
size_t nLen;
rtl_uString *pEscapedCwdPath = escape_path( pCwdPath );
sal_uInt32 nArg = 0;
- sal_uInt32 nArgCount = osl_getCommandArgCount();
+ sal_uInt32 nArgCount = rtl_getAppCommandArgCount();
rtl_uString_new_WithLength( &pBuffer, nCapacity );
rtl_uString_new( &pTmp );
@@ -487,7 +488,7 @@ send_args( int fd, rtl_uString *pCwdPath )
rtl_uString_getLength( pBuffer ),
",", 1 );
- osl_getCommandArg( nArg, &pTmp );
+ rtl_getAppCommandArg( nArg, &pTmp );
pEscapedTmp = escape_path( pTmp );
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index c7c91c64f707..527125f14a8a 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -21,6 +21,7 @@
#define _UNICODE
#include <cstddef>
+#include <cwchar>
#define WIN32_LEAN_AND_MEAN
#if defined _MSC_VER
@@ -290,7 +291,12 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
}
for ( int argn = 1; fSuccess && argn < argc2; argn++ )
{
- fSuccess = writeArgument(hPipe, ',', argv2[argn]);
+ if (std::wcsncmp(
+ argv2[argn], L"-env:", std::wcslen(L"-env:"))
+ != 0)
+ {
+ fSuccess = writeArgument(hPipe, ',', argv2[argn]);
+ }
}
if ( fSuccess )