Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > e80bd2e078075aac54a10812bcdc4bc6 > files > 14

kdelibs4-4.6.5-1.7.mga1.src.rpm

commit 86255d1e1fe388282fd776927ec7ff074d5d9c6d
Author: Dawit Alemayehu <adawit@kde.org>
Date:   Tue Oct 4 12:36:36 2011 -0400

    Do not attempt to save passwords into the wallet when the key supplied does
    not exist.
    
    BUG: 270209
    FIXED-IN: 4.7.3

diff --git a/kdewebkit/kwebwallet.cpp b/kdewebkit/kwebwallet.cpp
index 4e27ad1..ed19769 100644
--- a/kdewebkit/kwebwallet.cpp
+++ b/kdewebkit/kwebwallet.cpp
@@ -205,6 +205,11 @@ void KWebWallet::KWebWalletPrivate::fillDataFromCache(KWebWallet::WebFormList &f
 
 void KWebWallet::KWebWalletPrivate::saveDataToCache(const QString &key)
 {
+    // Make sure the specified keys exists before acting on it. See BR# 270209.
+    if (!pendingSaveRequests.contains(key)) {
+        return;
+    }
+
     bool success = false;
     const QUrl url = pendingSaveRequests.value(key).first().url;