summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-06-24 14:39:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-06-24 16:46:06 +0200
commit0ac7b859b8b292ae2ad196e1535c26c490f91a06 (patch)
treeb3107e7d11180be3e300b1e20de7b6b69dc1e6f0 /filter
parent7eab1e14c5874901757a291609f289911ac64031 (diff)
Don't convert from double to sal_Int32 when target is long
...which avoids, at least for platforms where long is larger than sal_Int32, some -fsanitize=float-cast-overflow when loading caolan/sw_ww8graf_mungetextintodrawbox_null_ptr_deref.sample (from the crashtestdata files), which reads huge (crafted?) values for some of l, o, r, u. (The casts to sal_Int32 had been there ever since at least d2000efb31f864e912c6cf52760eea0e602b6893 "#i106421#: move msfilter to filter", but there appears to be no good reason for that.) Change-Id: I1c8a874af6f0a0db7707612fe22bf06dfe832877 Reviewed-on: https://gerrit.libreoffice.org/74638 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index b34047889ebf..9486708c2995 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4309,7 +4309,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
double fWidth = nWidth * fXScale;
double fHeight = nHeight * fYScale;
- aObjData.aChildAnchor = tools::Rectangle( Point( static_cast<sal_Int32>(fl), static_cast<sal_Int32>(fo) ), Size( static_cast<sal_Int32>( fWidth + 1 ), static_cast<sal_Int32>( fHeight + 1 ) ) );
+ aObjData.aChildAnchor = tools::Rectangle( Point( fl, fo ), Size( fWidth + 1, fHeight + 1 ) );
}
}