bool ACodec::LoadedToIdleState::onMessageReceived(const sp<AMessage> &msg) {
 switch (msg->what()) {
 case kWhatSetParameters:
 case kWhatShutdown:
 {
            mCodec->deferMessage(msg);
 return true;
 }

 case kWhatSignalEndOfInputStream:
 {
            mCodec->onSignalEndOfInputStream();
 return true;
 }

 case kWhatResume:
 {
 return true;
 }

 case kWhatFlush:
 {
            sp<AMessage> notify = mCodec->mNotify->dup();
            notify->setInt32("what", CodecBase::kWhatFlushCompleted);
            notify->post();
 return true;
 }

 default:
 return BaseState::onMessageReceived(msg);
 }
}

The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.