summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-10-11 15:58:49 -0700
committerJeff Brown <jeffbrown@google.com>2012-10-11 15:58:49 -0700
commitc51cb89dd64cf366c162cf0fed4ba893f5c3e985 (patch)
tree71ca0cf53f3be97943eca7b6e579cfda9b1b7c84 /core/jni
parenta2f7ca7db1f797d7897dc66840d1ec64d1b2a6a1 (diff)
downloadframeworks_base-c51cb89dd64cf366c162cf0fed4ba893f5c3e985.zip
frameworks_base-c51cb89dd64cf366c162cf0fed4ba893f5c3e985.tar.gz
frameworks_base-c51cb89dd64cf366c162cf0fed4ba893f5c3e985.tar.bz2
Fix off-by-one.
Bug: 7330567 Change-Id: I8653435c77daefa24991595f68b9f23dd930f14a
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_os_UEventObserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android_os_UEventObserver.cpp b/core/jni/android_os_UEventObserver.cpp
index 7033ff3..3f7c7d2 100644
--- a/core/jni/android_os_UEventObserver.cpp
+++ b/core/jni/android_os_UEventObserver.cpp
@@ -49,7 +49,7 @@ static bool isMatch(const char* buffer, size_t length) {
// Consider all zero-delimited fields of the buffer.
const char* field = buffer;
- const char* end = buffer + length;
+ const char* end = buffer + length + 1;
do {
if (strstr(field, match.string())) {
ALOGV("Matched uevent message with pattern: %s", match.string());