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

Commit 414a57d5 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 1a7d90c4: am 7f651969: Merge "fix a potential buffer overflow in sensorservice" into jb-dev

* commit '1a7d90c4':
  fix a potential buffer overflow in sensorservice
parents 80ee5aae 1a7d90c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ bool SensorService::threadLoop()
    ALOGD("nuSensorService thread starting...");

    const size_t numEventMax = 16;
    const size_t minBufferSize = numEventMax * mVirtualSensorList.size();
    const size_t minBufferSize = numEventMax + numEventMax * mVirtualSensorList.size();
    sensors_event_t buffer[minBufferSize];
    sensors_event_t scratch[minBufferSize];
    SensorDevice& device(SensorDevice::getInstance());