chiark / gitweb /
util-lib: drop trailing non-printable characters from cmdline (#3512)
authorMax Prokhorov <prokhorov.max@outlook.com>
Mon, 13 Jun 2016 01:13:42 +0000 (04:13 +0300)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:59 +0000 (10:12 +0200)
commitab6b3ad1c10768be64343940878617b1ae438c43
treeae252e1f4468806f394fa7767b42ad30b27fa3c2
parentcf527c6873b86266ab75e56f28e2eada23866296
util-lib: drop trailing non-printable characters from cmdline (#3512)

If max_length is equal or greater than cmdline length all trailing non-printable
characters are dropped. If max_length is 0 it should do the same.

This should also fix cmdline truncation if the last character is not '\0'.

Fixes #3469.
src/basic/process-util.c