From bbcf26337cd2933205248909c55d5c1d161e9b9b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 30 May 2022 09:33:49 +0200 Subject: Avoid uninitialized temp_file_handle ...in case osl_create_temp_file_impl_ doesn't assign to it, for whatever osl_error reason, which then apparently leads to SIGSEGV at (relative to libreoffice-7-1) > 0 libuno_sal.so.3 osl_closeFile sal/osl/unx/file.cxx:1154 > 1 libuno_sal.so.3 osl_createTempFile sal/osl/unx/tempfile.cxx:330 > 2 libmergedlo.so PackedFile::flush include/osl/file.hxx:310 > 3 libmergedlo.so comphelper::BackupFileHelper::tryPush_file comphelper/source/misc/backupfilehelper.cxx:2090 [...] Change-Id: I2e81bbeab7daaaa3c19de4accce8a76ad24faa47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135111 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/osl/unx/tempfile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sal/osl') diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx index bd8e88db742c..29a4d453f80c 100644 --- a/sal/osl/unx/tempfile.cxx +++ b/sal/osl/unx/tempfile.cxx @@ -278,7 +278,7 @@ oslFileError SAL_CALL osl_createTempFile( rtl_uString** ppustrTempFileURL) { rtl_uString* base_directory = nullptr; - oslFileHandle temp_file_handle; + oslFileHandle temp_file_handle = nullptr; bool b_delete_on_close; oslFileError osl_error; -- cgit