You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ja...@apache.org on 2020/03/26 01:44:32 UTC

svn commit: r1875680 - /subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp

Author: jamessan
Date: Thu Mar 26 01:44:32 2020
New Revision: 1875680

URL: http://svn.apache.org/viewvc?rev=1875680&view=rev
Log:
Construct KAboutData using QString rather than QStringLiteral

If QStringLiteral is used, then a pointer to the data segment of the
libsvn_auth_kwallet shared library is stored in KAboutData.  On exit, when
KAboutData is being deleted, libsvn_auth_kwallet may have already been
unloaded, causing the destructor to access invalid memory.

Patch by: Bernhard Übelacker <bernhardu{_AT_}mailbox.org>

Modified:
    subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp

Modified: subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp?rev=1875680&r1=1875679&r2=1875680&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp (original)
+++ subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp Thu Mar 26 01:44:32 2020
@@ -227,10 +227,10 @@ kwallet_password_get(svn_boolean_t *done
   KLocalizedString::setApplicationDomain("subversion"); /* translation domain */
 
   /* componentName appears in KDE GUI prompts */
-  KAboutData aboutData(QStringLiteral("subversion"),     /* componentName */
+  KAboutData aboutData(QString("subversion"),            /* componentName */
                        i18n(get_application_name(parameters,
                                                  pool)), /* displayName */
-                       QStringLiteral(SVN_VER_NUMBER));
+                       QString(SVN_VER_NUMBER));
   KAboutData::setApplicationData(aboutData);
 #else
   KCmdLineArgs::init(q_argc, q_argv,
@@ -309,10 +309,10 @@ kwallet_password_set(svn_boolean_t *done
   KLocalizedString::setApplicationDomain("subversion"); /* translation domain */
 
   /* componentName appears in KDE GUI prompts */
-  KAboutData aboutData(QStringLiteral("subversion"),     /* componentName */
+  KAboutData aboutData(QString("subversion"),            /* componentName */
                        i18n(get_application_name(parameters,
                                                  pool)), /* displayName */
-                       QStringLiteral(SVN_VER_NUMBER));
+                       QString(SVN_VER_NUMBER));
   KAboutData::setApplicationData(aboutData);
 #else
   KCmdLineArgs::init(q_argc, q_argv,