Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a potential segfault if MDM::downloadNow() times out.

Reset the destination QByteArray pointer after a download
timeout to make sure the downloadFinished() callback doesn't
try to write to it after it has been deallocated.

Refs #9950

Signed-off-by: Chris Pinkham <cpinkham@mythtv.org>
(cherry picked from commit db25a28)
  • Loading branch information...
commit f7b28e57a9c5805befdf6538fb175124e0260ec2 1 parent 40f3bae
Lawrence Rust authored sphery committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  mythtv/libs/libmythdb/mythdownloadmanager.cpp
1  mythtv/libs/libmythdb/mythdownloadmanager.cpp
View
@@ -651,6 +651,7 @@ bool MythDownloadManager::downloadNow(MythDownloadInfo *dlInfo, bool deleteInfo)
if (!dlInfo->m_done)
{
+ dlInfo->m_data = NULL; // Prevent downloadFinished() from updating
dlInfo->m_syncMode = false; // Let downloadFinished() cleanup for us
if (dlInfo->m_reply)
dlInfo->m_reply->abort();
Please sign in to comment.
Something went wrong with that request. Please try again.