diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-11-09 14:27:18 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-11-09 14:29:35 +0100 |
commit | 361d5819d5c9331b0127401435d2f07467148da1 (patch) | |
tree | ba807645d1ddb735237fc12a354cccebfb30f603 /uui | |
parent | e9da91fd028e73846b1bed2618357d0abfbdcc57 (diff) |
uui: fix use-after-free on password dialog
VclPtr returned from CreatePasswordToOpenModifyDialog implicitly
converts to plain pointer then deletes the dialog.
(regression from some vclptr refactoring)
Change-Id: I4ccdeabcd6ee718104c0f7f65d67a20ce2c70ca3
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl-authentication.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 3edace12ce76..fa7d63f56117 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -528,8 +528,8 @@ executePasswordDialog( const sal_uInt16 nMaxPasswdLen = bMSCryptoMode ? 15 : 0; // 0 -> allow any length VclAbstractDialogFactory * pFact = VclAbstractDialogFactory::Create(); - AbstractPasswordToOpenModifyDialog *pTmp = pFact->CreatePasswordToOpenModifyDialog( pParent, nMaxPasswdLen, bIsPasswordToModify ); - ScopedVclPtr< AbstractPasswordToOpenModifyDialog > pDialog( pTmp ); + ScopedVclPtr<AbstractPasswordToOpenModifyDialog> const pDialog( + pFact->CreatePasswordToOpenModifyDialog(pParent, nMaxPasswdLen, bIsPasswordToModify)); rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL ); rInfo.SetPassword( pDialog->GetPasswordToOpen() ); |