D23708: [CopyJob] Fix crash when copying all files is skipped for an already existing dir

Ahmad Samir noreply at phabricator.kde.org
Tue Sep 3 17:22:50 BST 2019


ahmadsamir created this revision.
ahmadsamir added reviewers: Frameworks, dfaure.
Herald added a project: Frameworks.
ahmadsamir requested review of this revision.

REVISION SUMMARY
  In copyNextFile() if all files have been skipped QList::erase() will
  return end() iterator, accessing the element latter denotes leads
  to a crash; guard against that possibility.
  
  BUG: 408350
  FIXED-IN: 5.62.0

TEST PLAN
  kioclient5 copy SOME_DIR_WITH_FILES DEST
  kioclient5 copy --interactive SOME_DIR_WITH_FILES DEST
  
  - In the "folder already exists" dialog enable "Apply to all" then hit "Skip"
  - Without the patch you'd get a segmentation fault, with the patch the copy should finish as expected

REPOSITORY
  R241 KIO

BRANCH
  ahmad/copyjob (branched from master)

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

AFFECTED FILES
  src/core/copyjob.cpp

To: ahmadsamir, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190903/4540c5eb/attachment.html>


More information about the Kde-frameworks-devel mailing list