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 <>
(cherry picked from commit db25a28)
  • Loading branch information...
1 parent 40f3bae commit f7b28e57a9c5805befdf6538fb175124e0260ec2 Lawrence Rust committed with sphery Jul 28, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 mythtv/libs/libmythdb/mythdownloadmanager.cpp
1 mythtv/libs/libmythdb/mythdownloadmanager.cpp
@@ -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)

0 comments on commit f7b28e5

Please sign in to comment.