Avoid uninitialized temp_file_handle
commit53765732330043effb197529e759e21fca93ae1b
authorStephan Bergmann <sbergman@redhat.com>
Mon, 30 May 2022 07:33:49 +0000 (30 09:33 +0200)
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Wed, 1 Jun 2022 17:00:27 +0000 (1 19:00 +0200)
tree54be39fbb8b0af816cb879ff7cdbde828bd051fb
parent0292bf35109ec5eeb8d2fd098aae76c7db9fb1f4
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
<https://crashreport.libreoffice.org/stats/crash_details/e47a9fbb-a6f1-4020-ade8-ab51549b727a>
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 <sbergman@redhat.com>
(cherry picked from commit bbcf26337cd2933205248909c55d5c1d161e9b9b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135067
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit a4412bff3ed4b193f791ac1168fb7010c2936a1f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135069
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
sal/osl/unx/tempfile.cxx