Skip to content

qt: fix potential use after free

Fatih Uzunoğlu requested to merge fuzun/vlc:qt-use-after-free into master

If I interpreted it correctly,

  1. When m_reader->abandon is called, it schedules the object for deletion.
  2. The unique pointer TaskHandle<SVGColorImageReader> m_reader may try to dereference the internal pointer, which may no longer point to a valid SVGColorImageReader instance (in order to call abandon method again).

Also, I added a check in handleImageRead to not allow null pointer dereference. (see the comments, this should not be necessary)

Edited by Fatih Uzunoğlu

Merge request reports

Loading