From 057fbb58851f97cfcf4d90d5d3c539ac6f8ab13d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Jul 2010 20:15:08 +0200 Subject: [PATCH] util: fix space calculation in get_process_cmdline() --- src/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util.c b/src/util.c index 8c22dbef..d1120c60 100644 --- a/src/util.c +++ b/src/util.c @@ -601,6 +601,7 @@ int get_process_cmdline(pid_t pid, size_t max_length, char **line) { break; *(k++) = ' '; + left--; space = false; } @@ -608,6 +609,7 @@ int get_process_cmdline(pid_t pid, size_t max_length, char **line) { break; *(k++) = (char) c; + left--; } else space = true; } -- 2.39.5