filter/source/msfilter/msdffimp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 0ac7b859b8b292ae2ad196e1535c26c490f91a06 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Jun 24 14:39:03 2019 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Jun 24 16:46:06 2019 +0200 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 <sberg...@redhat.com> 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 ) ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits