https://bugs.documentfoundation.org/show_bug.cgi?id=156352
Patrick Luby <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |om, [email protected] --- Comment #12 from Patrick Luby <[email protected]> --- Here is what I found: I created a personal certificate in GPG Keychain.app and I applied the debug patch at the end of this comment in my local build. Then, when I displayed the certificate chooser dialog, I see lots of missing text in the entries as shown in attachement #11. In comparison, below is what the text view entries are actually set to when using my debug patch: Row 0:GPGTools Team <[email protected]>:GPGTools Team <[email protected]>:05/11/2024 Row 1:GPGTools Support <[email protected]>:GPGTools Support <[email protected]>:05/03/2024 Row 2:PL <[email protected]>:PL <[email protected]>:02/04/2028 Note that rows 0 and 1 are empty and row 2 is missing columns 1 and 2 as shown in attachment #11. Clearly the tree view's data becomes corrupted some how and, as a result, when y ou select one of the empty entries, the tree view contains a null pointer for th e user data: diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index a54575972c26..bc90554281f0 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -236,6 +236,10 @@ void CertificateChooser::ImplInitialize(bool mbSearch) m_xCertLB->set_text(nRow, xmlsec::GetContentPart(xCert->getSubjectName(), xCert->getCertificateKind()), 0); m_xCertLB->set_text(nRow, sIssuer, 1); m_xCertLB->set_text(nRow, sExpDate, 2); +fprintf(stderr, "Row %i:%s:%s:%s\n", nRow, +m_xCertLB->get_text(nRow, 0).toUtf8().getStr(), +m_xCertLB->get_text(nRow, 1).toUtf8().getStr(), +m_xCertLB->get_text(nRow, 2).toUtf8().getStr()); #if HAVE_FEATURE_GPGME // only GPG has preferred keys @@ -275,6 +279,9 @@ uno::Sequence<uno::Reference< css::security::XCertificate > > CertificateChooser // for encryption, multiselection is enabled m_xCertLB->selected_foreach([this, &aRet](weld::TreeIter& rEntry){ UserData* userData = weld::fromId<UserData*>(m_xCertLB->get_id(rEntry)); + // tdf#156352 when empty GPGTools key is selected because userData + // is a null pointer. Is the underlying list box's memory being + // corrupted or is the list box implementation buggy? aRet.push_back( userData->xCertificate ); return false; }); -- You are receiving this mail because: You are the assignee for the bug.
