diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-04 15:48:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-04 15:48:29 +0200 |
commit | bc1096fed97baae496d2b16868a9d7e36017bc59 (patch) | |
tree | 2fc6e8c7bcae2c2ff84bb4fdaab17a94456b840a /sc/inc/table.hxx | |
parent | 59e38e946f19ab59370f8e52370b7a7b861cc558 (diff) |
Avoid UBSan "reference binding to null pointer"
...at least during JunitTest_sc_unoapi_2 at
> ScTable::DoSubTotals(ScSubTotalParam&) sc/source/core/data/table3.cxx:2097:25
> ScDocument::DoSubTotals(short, ScSubTotalParam&) sc/source/core/data/documen3.cxx:761:104
> ScDBDocFunc::DoSubTotals(short, ScSubTotalParam const&, bool, bool) sc/source/ui/docshell/dbdocfun.cxx:1076:29
> ScCellRangeObj::applySubTotals(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor> const&, unsigned char) sc/source/ui/unoobj/cellsuno.cxx:5868:15
> gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5
> cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:241:13
> bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:431:13
> binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const binaryurp/source/incomingrequest.cxx:240:13
> binaryurp::IncomingRequest::execute() const binaryurp/source/incomingrequest.cxx:77:26
> request binaryurp/source/reader.cxx:85:9
> cppu_threadpool::JobQueue::enter(long, bool) cppu/source/threadpool/jobqueue.cxx:107:17
> cppu_threadpool::ORequestThread::run() cppu/source/threadpool/thread.cxx:165:31
> threadFunc include/osl/thread.hxx:185:15
> osl_thread_start_Impl(void*) sal/osl/unx/thread.cxx:240:9
> start_thread (/lib64/libpthread.so.0+0x75c9)
> __clone (/lib64/libc.so.6+0x102f6c)
pStyle can apparently be null, will get passed through to ScColumn::ApplyStyle
(sc/source/core/data/column.cxx), where it is only used in
pNewPattern->SetStyleSheet(const_cast<ScStyleSheet*>(&rStyle));
and which is apparently fine with a null argument.
Change-Id: I13fbb092aab06960d820c605476b2cee58889be4
Diffstat (limited to 'sc/inc/table.hxx')
-rw-r--r-- | sc/inc/table.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index e4e14329cdbe..e163233736c5 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -633,7 +633,7 @@ public: void AddCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex ); void RemoveCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex ); - void ApplyStyle( SCCOL nCol, SCROW nRow, const ScStyleSheet& rStyle ); + void ApplyStyle( SCCOL nCol, SCROW nRow, const ScStyleSheet* rStyle ); void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScStyleSheet& rStyle ); void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark); void ApplySelectionLineStyle( const ScMarkData& rMark, |