From 6966c22daad028359bac6747d709416a64779d6a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 28 Jun 2015 14:05:05 +0200 Subject: [PATCH] src/daemon/common.c: Fix off-by-one error in escape_slashes(). Partial cherry-pick of 0cba91923be9326224f8434e4aae7691f7b6dad1. --- src/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.c b/src/common.c index f41e9506..c2849420 100644 --- a/src/common.c +++ b/src/common.c @@ -445,7 +445,7 @@ int escape_slashes (char *buf, int buf_len) if (buf[0] == '/') memmove (buf, buf + 1, buf_len - 1); - for (i = 0; i < buf_len - 1; i++) + for (i = 0; i < buf_len; i++) { if (buf[i] == '\0') break; -- 2.30.2