diff options
author | Ivan Lozano <ivanlozano@google.com> | 2018-01-03 23:34:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-01-03 23:34:04 +0000 |
commit | 6f1f7b988255db1162033c7a4bd26a92c507dcf3 (patch) | |
tree | 416c5930f571258d9be1488d6e2d2f7df8229600 /libs | |
parent | 28b48f29d5c76f1ef097904d3bc3c5c0cd5dadb2 (diff) | |
parent | 0ace760df7cb2983ea1d799bdbb4f5239cf115b8 (diff) | |
download | native-6f1f7b988255db1162033c7a4bd26a92c507dcf3.tar.gz |
Merge "Fix sanitizer in ISensorService list functions."
Diffstat (limited to 'libs')
-rw-r--r-- | libs/sensor/ISensorServer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/sensor/ISensorServer.cpp b/libs/sensor/ISensorServer.cpp index f20668d1e9..efbbf7d826 100644 --- a/libs/sensor/ISensorServer.cpp +++ b/libs/sensor/ISensorServer.cpp @@ -63,7 +63,8 @@ public: Vector<Sensor> v; uint32_t n = reply.readUint32(); v.setCapacity(n); - while (n--) { + while (n) { + n--; reply.read(s); v.add(s); } @@ -80,7 +81,8 @@ public: Vector<Sensor> v; uint32_t n = reply.readUint32(); v.setCapacity(n); - while (n--) { + while (n) { + n--; reply.read(s); v.add(s); } |