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

Commit e94b29f5 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "libstagefright: Add error handling in AMRNB deooder" into gingerbread

parents 65ce88a8 3e8686b7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -161,6 +161,11 @@ status_t AMRNBDecoder::read(
          static_cast<int16_t *>(buffer->data()),
          MIME_IETF);

    if (numBytesRead == -1 ) {
        buffer->release();
        buffer = NULL;
        return ERROR_MALFORMED;
    }
    ++numBytesRead;  // Include the frame type header byte.

    buffer->set_range(0, kNumSamplesPerFrame * sizeof(int16_t));