Kaydet (Commit) d6bf6c58 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#3743 Divide-by-zero

Change-Id: I6cdc8b4c852a126c8740fc23c10f9360d8caf1a5
Reviewed-on: https://gerrit.libreoffice.org/43752Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 38081c08
...@@ -478,12 +478,20 @@ namespace emfio ...@@ -478,12 +478,20 @@ namespace emfio
break; break;
default : default :
{ {
fWidth /= mnWinExtX; if (mnPixX == 0 || mnPixY == 0)
fHeight /= mnWinExtY; {
fWidth *= mnDevWidth; SAL_WARN("vcl.emf", "invalid scaling factor");
fHeight *= mnDevHeight; return Size();
fWidth *= (double)mnMillX * 100 / (double)mnPixX; }
fHeight *= (double)mnMillY * 100 / (double)mnPixY; else
{
fWidth /= mnWinExtX;
fHeight /= mnWinExtY;
fWidth *= mnDevWidth;
fHeight *= mnDevHeight;
fWidth *= (double)mnMillX * 100.0 / (double)mnPixX;
fHeight *= (double)mnMillY * 100.0 / (double)mnPixY;
}
} }
break; break;
} }
......
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