Changeset 140524 in webkit


Ignore:
Timestamp:
Jan 23, 2013 1:21:19 AM (11 years ago)
Author:
sergio@webkit.org
Message:

REGRESSION(r140338): WebKitGtk+ trying to allocate a buffer too big
https://bugs.webkit.org/show_bug.cgi?id=107646

Reviewed by Carlos Garcia Campos.

g_input_stream_skip_async() was replaced in r140338 by
g_input_stream_read_async() to workaround a glib buffer. The former
was using G_MAXSSIZE to skip the whole redirect message but we
cannot use it for the latter because it will try to
allocate a buffer of that size. Replaced it by READ_BUFFER_SIZE. No
new tests required, functionality already covered by network tests..

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::redirectSkipCallback):
(WebCore::sendRequestCallback):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140523 r140524  
     12013-01-23  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        REGRESSION(r140338): WebKitGtk+ trying to allocate a buffer too big
     4        https://bugs.webkit.org/show_bug.cgi?id=107646
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        g_input_stream_skip_async() was replaced in r140338 by
     9        g_input_stream_read_async() to workaround a glib buffer. The former
     10        was using G_MAXSSIZE to skip the whole redirect message but we
     11        cannot use it for the latter because it will try to
     12        allocate a buffer of that size. Replaced it by READ_BUFFER_SIZE. No
     13        new tests required, functionality already covered by network tests..
     14
     15        * platform/network/soup/ResourceHandleSoup.cpp:
     16        (WebCore::redirectSkipCallback):
     17        (WebCore::sendRequestCallback):
     18
    1192013-01-23  Andrey Adaikin  <aandrey@chromium.org>
    220
  • trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp

    r140445 r140524  
    527527
    528528    if (bytesSkipped > 0) {
    529         g_input_stream_read_async(d->m_inputStream.get(), d->m_buffer, G_MAXSSIZE, G_PRIORITY_DEFAULT,
     529        g_input_stream_read_async(d->m_inputStream.get(), d->m_buffer, READ_BUFFER_SIZE, G_PRIORITY_DEFAULT,
    530530            d->m_cancellable.get(), redirectSkipCallback, handle.get());
    531531        return;
     
    682682            // https://bugzilla.gnome.org/show_bug.cgi?id=691489 until we can
    683683            // depend on glib > 2.35.4
    684             g_input_stream_read_async(d->m_inputStream.get(), d->m_buffer, G_MAXSSIZE, G_PRIORITY_DEFAULT,
     684            g_input_stream_read_async(d->m_inputStream.get(), d->m_buffer, READ_BUFFER_SIZE, G_PRIORITY_DEFAULT,
    685685                d->m_cancellable.get(), redirectSkipCallback, handle.get());
    686686            return;
Note: See TracChangeset for help on using the changeset viewer.