sw/source/core/unocore/unotbl.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit eea79562f1a5785a8a22cde732a091725e46bbad Author: LeMoyne Castle <[email protected]> Date: Tue Apr 25 22:44:16 2017 -0600 tdf#107350 - prevent crash in unotbl.cxx check pointer and throw exception instead of SIGABRT when reading data from text tables that have varying row &/or col lengths from - merged cells after first row, - split cells in first row, etc. add backstop safety check -> exception because - complexity check fails (wrong/not called) - OOo uno api doc calls for exception when text table is 'too complex' v2: better error message for crash point and its parallel (getData[Array]) Change-Id: Ifb844c3e29042dab6b6cdb2448f7728e6ccb631d Reviewed-on: https://gerrit.libreoffice.org/37002 Tested-by: Jenkins <[email protected]> Reviewed-by: Björn Michaelsen <[email protected]> diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 4125bc11026b..37d5c1e6da2b 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3621,7 +3621,7 @@ uno::Sequence<uno::Sequence<uno::Any>> SAL_CALL SwXCellRange::getDataArray() { auto pCell(static_cast<SwXCell*>(pCurrentCell->get())); if(!pCell) - throw uno::RuntimeException(); + throw uno::RuntimeException("Table too complex", static_cast<cppu::OWeakObject*>(this)); rCellAny = pCell->GetAny(); ++pCurrentCell; } @@ -3688,6 +3688,8 @@ SwXCellRange::getData() rRow = uno::Sequence<double>(nColCount); for(auto& rValue : rRow) { + if(!(*pCurrentCell)) + throw uno::RuntimeException("Table too complex", static_cast<cppu::OWeakObject*>(this)); rValue = (*pCurrentCell)->getValue(); ++pCurrentCell; }
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
