[dolphin] [Bug 465243] Dolphin crashes while setting up a new KWallet password store for network share credentials

Frank Schaefer bugzilla_noreply at kde.org
Sat Apr 29 12:09:27 BST 2023


https://bugs.kde.org/show_bug.cgi?id=465243

--- Comment #3 from Frank Schaefer <fschaefer.oss at googlemail.com> ---
Looking int
https://invent.kde.org/frameworks/kio/-/blob/v5.105.0/src/core/kcoredirlister.cpp:
...
KCoreDirListerCache::slotUpdateResult():
{
...
    DirItem *dir = itemsInUse.value(jobUrl, nullptr);
    if (!dir) {
        qCWarning(KIO_CORE) << "Internal error: itemsInUse did not contain" <<
jobUrl;
#ifndef NDEBUG
        printDebug();
#endif
        Q_ASSERT(dir);
    } else {
        dir->complete = true;
    }
    ...
// => so dir can be nullptr and we go on
    ...
    for (const KFileItem &item : std::as_const(dir->lstItems)) {
// => BOOM. dir is dereferenced without nullptr check.
        fileItems.insert(item.name(), item);
    }
   ...
}

Looks like it is enough to embrace this loop with a nullptr check, but someone
who knows KIO better should validate that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list