Kaydet (Commit) b5876bfc authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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/26317Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 4d18c1de
......@@ -548,6 +548,9 @@ static void do_msvcr_magic(rtl_uString *jvm_dll)
FILE *f = _wfopen(reinterpret_cast<LPCWSTR>(Module->buffer), L"rb");
if (!f)
return;
if (fstat(fileno(f), &st) == -1)
{
fclose(f);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment