Changeset 154006 in webkit


Ignore:
Timestamp:
Aug 13, 2013 9:19:31 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154005 r154006  
     12013-08-13  peavo@outlook.com  <peavo@outlook.com>
     2
     3        [Curl] Possible infinite loop while downloading.
     4        https://bugs.webkit.org/show_bug.cgi?id=119744
     5
     6        Reviewed by Darin Adler.
     7
     8        If adding/removing curl handles fails, the download thread
     9        can end up in an endless loop trying to update the curl handle list.
     10
     11        * platform/network/curl/CurlDownload.cpp:
     12        (WebCore::CurlDownloadManager::updateHandleList): Avoid infinite loop by ignoring return value.
     13
    1142013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
    215
  • trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp

    r153944 r154006  
    124124    int size = m_removedHandleList.size();
    125125    for (int i = 0; i < size; i++) {
    126         if (removeFromCurl(m_removedHandleList[0]))
    127             m_removedHandleList.remove(0);
     126        removeFromCurl(m_removedHandleList[0]);
     127        m_removedHandleList.remove(0);
    128128    }
    129129
     
    131131    size = m_pendingHandleList.size();
    132132    for (int i = 0; i < size; i++) {
    133         if (addToCurl(m_pendingHandleList[0]))
    134             m_pendingHandleList.remove(0);
     133        addToCurl(m_pendingHandleList[0]);
     134        m_pendingHandleList.remove(0);
    135135    }
    136136}
Note: See TracChangeset for help on using the changeset viewer.