D28535: [KIO-MTP] Fix null pointer dereference

Fabian Vogt noreply at phabricator.kde.org
Fri Apr 3 13:27:59 BST 2020


fvogt added a comment.


  In D28535#640680 <https://phabricator.kde.org/D28535#640680>, @anthonyfieroni wrote:
  
  > I see we don't speak in same language :)
  >  `LIBMTP_Open_Raw_Device_Uncached(&m_rawdevice);`
  >  returns nullptr that's normal since device is inaccessible, i mean it does not need to call `LIBMTP_Release_Device` using `m_mtpdevice` is safe it's not nullptr, it's just a disconnected device and libmtp knows that.
  
  
  Yes, and until that point everything is fine.
  Only after `m_mtpdevice = LIBMTP_Open_Raw_Device_Uncached(&m_rawdevice);`, which sets `m_mtpdevice` to nullptr it goes down the path I outlined.

REPOSITORY
  R320 KIO Extras

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

To: feverfew, akrutzler, dfaure, elvisangelaccio
Cc: anthonyfieroni, kde-frameworks-devel, fvogt, kfm-devel, ngraham, nikolaik, pberestov, iasensio, fprice, LeGast00n, cblack, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200403/bd4bc401/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list