passing a NULL pointer to fileno is not allowed
See crash reports at http://crashreport.libreoffice.org/stats/signature/do_msvcr_magic+0x7 and documentation at https://msdn.microsoft.com/en-us/library/zs6wbdhx.aspx Change-Id: Ia9166d3b9fa10b87585821504e39cdfecbd22eda Reviewed-on: https://gerrit.libreoffice.org/26317 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
This commit is contained in:
parent
4d18c1de11
commit
b5876bfcb6
@ -548,6 +548,9 @@ static void do_msvcr_magic(rtl_uString *jvm_dll)
|
|||||||
|
|
||||||
FILE *f = _wfopen(reinterpret_cast<LPCWSTR>(Module->buffer), L"rb");
|
FILE *f = _wfopen(reinterpret_cast<LPCWSTR>(Module->buffer), L"rb");
|
||||||
|
|
||||||
|
if (!f)
|
||||||
|
return;
|
||||||
|
|
||||||
if (fstat(fileno(f), &st) == -1)
|
if (fstat(fileno(f), &st) == -1)
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user