winaccessibility/source/UAccCOM/AccActionBase.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 0feb490c7625ed1bef7c59d197436fc849bd8dfa Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon May 6 13:16:04 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue May 7 06:06:45 2024 +0200 wina11y: Return E_INVALIDARG if out param is null Change-Id: Ia7abdd7fe1fbc5b1a6eaecf7d842852bc3815e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167201 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx b/winaccessibility/source/UAccCOM/AccActionBase.cxx index 0b7a652cef9f..aa5f63b55c61 100644 --- a/winaccessibility/source/UAccCOM/AccActionBase.cxx +++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx @@ -58,16 +58,18 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::nActions(/*[out,retval]*/long* { SolarMutexGuard g; + if (!nActions) + return E_INVALIDARG; + try { - if( pRXAct.is() && nActions != nullptr ) + if (pRXAct.is()) { *nActions = pRXAct->getAccessibleActionCount(); return S_OK; } - if( nActions != nullptr ) - *nActions = 0; + *nActions = 0; return S_OK; } catch(...) { return E_FAIL; }