vcl/source/outdev/map.cxx | 12 ------------ 1 file changed, 12 deletions(-)
New commits: commit d8e7bc042bd0912a66c231b101cecda0f838a80f Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Mar 4 10:01:57 2015 +0100 Remove hack of replacing 0 with 1/LONG_MAX ...that hack was in there since the initial import, but it is unclear to me what it shall fix, and it rather leads to problems as reported by -fsanitize=signed-integer-overflow when OuptutDevice::PixelToLogic of a 1x1 Size calls ImplPixelToLogic with n=1, nMapDenom=LONG_MAX causing the computation of 2*n64 to overflow on 64-bit Linux. Change-Id: I2465da46175b8a1d4af1c23fb3df993230eec78d diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 7a9cc0c..5a43c07 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -329,18 +329,6 @@ static void ImplCalcMapResolution( const MapMode& rMapMode, rMapRes.mnMapScDenomX = aTempX.GetDenominator(); rMapRes.mnMapScNumY = aTempY.GetNumerator(); rMapRes.mnMapScDenomY = aTempY.GetDenominator(); - - // hack: 0/n approximately 1/max - if ( !rMapRes.mnMapScNumX ) - { - rMapRes.mnMapScNumX = 1; - rMapRes.mnMapScDenomX = LONG_MAX; - } - if ( !rMapRes.mnMapScNumY ) - { - rMapRes.mnMapScNumY = 1; - rMapRes.mnMapScDenomY = LONG_MAX; - } } inline void ImplCalcMapResolution( const MapMode& rMapMode, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits