From 710171dbfeb9ddba1293ddb605f5d6706b4ac6b5 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 16 Jan 2015 07:16:24 -0800 Subject: [PATCH] Fix off-by-one error in rev.13834 Detected by Coverity Scan. Issue 1264388. --- src/ipc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc.cc b/src/ipc.cc index 56b4ed0720..03f4d7812d 100644 --- a/src/ipc.cc +++ b/src/ipc.cc @@ -251,7 +251,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name else x = read(prfd, hello_buf, sizeof(hello_buf)-1); if (x >= 0) - hello_buf[x+1] = '\0'; + hello_buf[x] = '\0'; if (x < 0) { debugs(54, DBG_CRITICAL, "ipcCreate: PARENT: hello read test failed"); -- 2.47.3