diff options
Diffstat (limited to 'src/firejail/util.c')
-rw-r--r-- | src/firejail/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/firejail/util.c b/src/firejail/util.c index d2e6c2799..89d0697fd 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -258,7 +258,7 @@ char *line_remove_spaces(const char *buf) { | |||
258 | } | 258 | } |
259 | 259 | ||
260 | // strip last blank character if any | 260 | // strip last blank character if any |
261 | if (*(ptr2 - 1) == ' ') | 261 | if (ptr2 > rv && *(ptr2 - 1) == ' ') |
262 | --ptr2; | 262 | --ptr2; |
263 | *ptr2 = '\0'; | 263 | *ptr2 = '\0'; |
264 | // if (arg_debug) | 264 | // if (arg_debug) |