summaryrefslogtreecommitdiffstats
path: root/services/sensorservice
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-05-08 15:59:23 -0700
committerAravind Akella <aakella@google.com>2015-05-08 15:59:23 -0700
commit08f04bf36c3f5d2e91de5525dfce778e56464fc2 (patch)
treea718e525021e64bb0ba98ef3d5e3d74e328f4dfc /services/sensorservice
parentd9c4971da2f2c4f980a748006bd40469c3332a13 (diff)
downloadframeworks_native-08f04bf36c3f5d2e91de5525dfce778e56464fc2.zip
frameworks_native-08f04bf36c3f5d2e91de5525dfce778e56464fc2.tar.gz
frameworks_native-08f04bf36c3f5d2e91de5525dfce778e56464fc2.tar.bz2
Fix the arguments to memcpy.
Change-Id: Ieaee26f46f43a9d412537047566178985370198b
Diffstat (limited to 'services/sensorservice')
-rw-r--r--services/sensorservice/SensorService.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index c8dc6ec..7bc4990 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -1680,7 +1680,7 @@ int SensorService::SensorEventConnection::handleEvent(int fd, int events, void*
#endif
} else if (numBytesRead == sizeof(uint32_t)) {
uint32_t numAcks = 0;
- memcpy(&numAcks, buf, sizeof(numBytesRead));
+ memcpy(&numAcks, buf, numBytesRead);
// Sanity check to ensure there are no read errors in recv, numAcks is always
// within the range and not zero. If any of the above don't hold reset
// mWakeLockRefCount to zero.