chart2/source/controller/main/ControllerCommandDispatch.cxx | 4 ++-- tools/source/stream/stream.cxx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit a9a4b82c9f5523fbd500a4db0933c5f5ab9902b6 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Feb 21 11:43:12 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Feb 21 14:45:45 2022 +0100 cid#1500458 Dereference after null check Change-Id: Ic9626b0817ee65fbc6d68592c592c3c2e39d42e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130267 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 4e326eb313c7..d7406d3dbf60 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -584,11 +584,11 @@ void ControllerCommandDispatch::updateCommandAvailability() m_aCommandAvailability[ ".uno:InsertMenuDataLabels" ] = bIsWritable; m_aCommandAvailability[ ".uno:InsertRemoveAxes" ] = m_aCommandAvailability[ ".uno:InsertMenuAxes" ] = bIsWritable && m_apModelState->bSupportsAxes; m_aCommandAvailability[ ".uno:InsertMenuGrids" ] = bIsWritable && m_apModelState->bSupportsAxes; - m_aCommandAvailability[ ".uno:InsertMenuTrendlines" ] = bIsWritable && m_apModelState->bSupportsStatistics && m_apControllerState->bMayAddMenuTrendline; + m_aCommandAvailability[ ".uno:InsertMenuTrendlines" ] = bIsWritable && m_apModelState->bSupportsStatistics && bControllerStateIsValid && m_apControllerState->bMayAddMenuTrendline; m_aCommandAvailability[ ".uno:InsertMenuMeanValues" ] = bIsWritable && m_apModelState->bSupportsStatistics; m_aCommandAvailability[ ".uno:InsertMenuXErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics; m_aCommandAvailability[ ".uno:InsertMenuYErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics; - m_aCommandAvailability[ ".uno:InsertSymbol" ] = bIsWritable && m_apControllerState->bIsTextObject; + m_aCommandAvailability[ ".uno:InsertSymbol" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsTextObject; // format objects bool bFormatObjectAvailable = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsFormateableObjectSelected; commit 587f3f98e1c00112200941750745e638bc830b41 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Feb 21 11:37:36 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Feb 21 14:45:32 2022 +0100 cid#1500555 silence Untrusted loop bound and others, we're not bothered that the contents of the string might have been constructed using byte swapping Change-Id: I0d0c2e0667bf270e2c15624c59312f3f203bb83c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130246 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index a40e13d70b82..c567aad82d36 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1850,7 +1850,8 @@ OUString read_uInt16s_ToOUString(SvStream& rStrm, std::size_t nLen) } } - //take ownership of buffer and return, otherwise return empty string + // take ownership of buffer and return, otherwise return empty string + // coverity[return_tainted_data : SUPPRESS] - we consider the string untainted at this point return pStr ? OUString(pStr, SAL_NO_ACQUIRE) : OUString(); }