Issue 127895 - Possible access to unintended variable in "openoffice/main/sfx2/source/doc/sfxbasemodel.cxx" line 940
Summary: Possible access to unintended variable in "openoffice/main/sfx2/source/doc/sf...
Status: RESOLVED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: 4.1.15
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-17 14:28 UTC by Petru-Florin Mihancea
Modified: 2023-04-23 10:49 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Petru-Florin Mihancea 2018-09-17 14:28:43 UTC
While experimenting with a CodeSonar plugin we develop, we noticed a
potential issue in file "openoffice/main/sfx2/source/doc/sfxbasemodel.cxx" line 940 function SfxBaseModel::disposing:

else if ( xDocListener.is() )
m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference< XDOCEVENTLISTENER >*)0), xListener ); //HERE

Shouldn't xDocListener be used instead of xListener?

Thanks,
Petru-Florin Mihancea
Comment 1 oooforum (fr) 2019-10-04 19:54:58 UTC
Now, you can propose a patch through Github:
 https://github.com/apache/openoffice/
Comment 3 Matthias Seidel 2023-04-23 10:49:20 UTC
Cherry-picked for AOO41X with:
https://github.com/apache/openoffice/commit/e4c033a6c67754b39675d5af31808c4bb3a33173