Cronet iOS: unbounded buffer in HttpProtocolHandlerCore::OnReadCompleted can cause OOM error |
|||
Issue descriptionNSMutableData 'data' variable allocated in HttpProtocolHandlerCore::OnReadCompleted grows indefinitely until there is no more data to read from the underlying URLRequest. During local test runs, the allocated memory for the buffer exceeded 1GB. We need to put a cap on it. The iOS system stack limits it approximately to 160KB.
,
May 2 2017
,
May 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/922dd693b59ee99082ab9bab9daab3822d03047a commit 922dd693b59ee99082ab9bab9daab3822d03047a Author: kapishnikov <kapishnikov@chromium.org> Date: Fri May 12 15:51:35 2017 iOS Cronet: Put cap on the buffer size passed to onReadCompleted delegate The change also allows the client to start handling the received data sooner. BUG= 717551 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2857733002 Cr-Commit-Position: refs/heads/master@{#471319} [modify] https://crrev.com/922dd693b59ee99082ab9bab9daab3822d03047a/components/cronet/ios/test/cronet_http_test.mm [modify] https://crrev.com/922dd693b59ee99082ab9bab9daab3822d03047a/ios/net/crn_http_protocol_handler.mm
,
May 12 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by kapishnikov@chromium.org
, May 2 2017