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

Commit 1a7d90c4 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

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

* commit '7f651969':
  fix a potential buffer overflow in sensorservice
parents ac8ed11d 7f651969
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());