Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a6825b4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-b39caaa3-4861-4759-a55f-8e0eb691097b" into cw-f-dev

* changes:
  [automerger] httplive: detect oom if playlist is infinite am: f3808d3a am: a7a8c35d am: f5dcf4dc
  [automerger] httplive: detect oom if playlist is infinite am: f3808d3a am: a7a8c35d
  [automerger] httplive: detect oom if playlist is infinite am: f3808d3a
  httplive: detect oom if playlist is infinite
parents 0d6a0e7d 2f3fb262
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -157,6 +157,12 @@ ssize_t HTTPDownloader::fetchBlock(
                 buffer->size() + bufferRemaining);

            sp<ABuffer> copy = new ABuffer(buffer->size() + bufferRemaining);
            if (copy->data() == NULL) {
                android_errorWriteLog(0x534e4554, "68399439");
                ALOGE("not enough memory to download: requesting %zu + %zu",
                        buffer->size(), bufferRemaining);
                return NO_MEMORY;
            }
            memcpy(copy->data(), buffer->data(), buffer->size());
            copy->setRange(0, buffer->size());