diff options
-rw-r--r-- | extensions/source/scanner/scanwin.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index 11e2e7345df4..48b2c78bd90e 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <cstring> + #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/Desktop.hpp> @@ -261,7 +265,9 @@ void Twain::ShimListenerThread::execute() // We need a WinAPI HANDLE of the process to be able to wait on it and detect the process // termination; so use WinAPI to start the process, not osl_executeProcess. - STARTUPINFOW si{ sizeof(si) }; // null-initialize all but cb + STARTUPINFOW si; + std::memset(&si, 0, sizeof si); + si.cb = sizeof(STARTUPINFOW); PROCESS_INFORMATION pi; if (!CreateProcessW(nullptr, const_cast<LPWSTR>(o3tl::toW(sCmdLine.getStr())), nullptr, |