[Curl] Possible infinite loop while downloading.

https://bugs.webkit.org/show_bug.cgi?id=119744

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-08-13
Reviewed by Darin Adler.

If adding/removing curl handles fails, the download thread
can end up in an endless loop trying to update the curl handle list.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::updateHandleList): Avoid infinite loop by ignoring return value.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 64a2fa50
2013-08-13 peavo@outlook.com <peavo@outlook.com>
[Curl] Possible infinite loop while downloading.
https://bugs.webkit.org/show_bug.cgi?id=119744
Reviewed by Darin Adler.
If adding/removing curl handles fails, the download thread
can end up in an endless loop trying to update the curl handle list.
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::updateHandleList): Avoid infinite loop by ignoring return value.
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
HTMLSelectElement.item() does not behave according to specification
......@@ -123,15 +123,15 @@ void CurlDownloadManager::updateHandleList()
// Remove curl easy handles from multi list
int size = m_removedHandleList.size();
for (int i = 0; i < size; i++) {
if (removeFromCurl(m_removedHandleList[0]))
m_removedHandleList.remove(0);
removeFromCurl(m_removedHandleList[0]);
m_removedHandleList.remove(0);
}
// Add pending curl easy handles to multi list
size = m_pendingHandleList.size();
for (int i = 0; i < size; i++) {
if (addToCurl(m_pendingHandleList[0]))
m_pendingHandleList.remove(0);
addToCurl(m_pendingHandleList[0]);
m_pendingHandleList.remove(0);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment