Fix issue #18000467: processgroup truncates buffer

Change-Id: I3d98a4da9c47d83d25a11ff0ef94cfcab1feabea
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 @@
     }
 
     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));