summaryrefslogtreecommitdiffstats
path: root/libprocessgroup
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-10-15 11:36:28 -0700
committerDianne Hackborn <hackbod@google.com>2014-10-15 11:36:28 -0700
commit67f46cb0e137edbf4a6f7014ca8a3a58484016d1 (patch)
treea44eaa76b3cccf26e40007630989e28eb3c0d576 /libprocessgroup
parent2c5e7e102bc2059d22f8457db68c567b64cec963 (diff)
downloadsystem_core-67f46cb0e137edbf4a6f7014ca8a3a58484016d1.zip
system_core-67f46cb0e137edbf4a6f7014ca8a3a58484016d1.tar.gz
system_core-67f46cb0e137edbf4a6f7014ca8a3a58484016d1.tar.bz2
Fix issue #18000467: processgroup truncates buffer
Change-Id: I3d98a4da9c47d83d25a11ff0ef94cfcab1feabea
Diffstat (limited to 'libprocessgroup')
-rw-r--r--libprocessgroup/processgroup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index d5f3ad3..49f5903 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -99,7 +99,7 @@ static int refillBuffer(struct ctx *ctx)
}
ctx->buf_len += ret;
- ctx->buf[ctx->buf_len-1] = 0;
+ ctx->buf[ctx->buf_len] = 0;
SLOGV("Read %d to buffer: %s", ret, ctx->buf);
assert(ctx->buf_len <= sizeof(ctx->buf));