D20281: Protect against invalid parents in the IdTreeDB

Stefan BrĂ¼ns noreply at phabricator.kde.org
Fri Apr 5 21:28:22 BST 2019


bruns created this revision.
bruns added reviewers: Baloo, Frameworks, ngraham, poboiko, astippich.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  DocumentUrlDB::put is susceptible to invalid parent ids caused by e.g.
  renaming while a file/path is added. filePathToId will return 0 for a
  (now) invalid dir, although 0 is reserved for the root folder.
  
  As Writetransaction::removeRecursively calls itself for any child document,
  having a 0 as child causes infinite recursion.

TEST PLAN
  ctest

REPOSITORY
  R293 Baloo

BRANCH
  fix_invalid_parentid

REVISION DETAIL
  https://phabricator.kde.org/D20281

AFFECTED FILES
  src/engine/documenturldb.cpp
  src/engine/writetransaction.cpp

To: bruns, #baloo, #frameworks, ngraham, poboiko, astippich
Cc: kde-frameworks-devel, gennad, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190405/f4f3e91f/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list