]> granicus.if.org Git - procps-ng/commit
procio: use the user-supplied delimiter to split large input
authorPatrick Steinhardt <ps@pks.im>
Fri, 8 Jun 2018 11:27:20 +0000 (13:27 +0200)
committerCraig Small <csmall@enc.com.au>
Mon, 4 Mar 2019 10:44:52 +0000 (21:44 +1100)
commit32720b2ee6c36b84005a002def17e79e3ab009e1
treeebe4a8dfbad97d35eb073040183ac800e025a4a2
parent9b9aa9a6e9bc50cb5828fa31ed0a9a050e102d0c
procio: use the user-supplied delimiter to split large input

The `fprocopen` function allows users to specify a delimiter chacter
that is used to split very large input lines into smaller chunks. While
the code checks that the caller did actually supply the delimiter, it is
in fact never used to split the string. Instead, the hardcoded default
character ',' is always used to split the string.

Fix the issue by using `cookie->delim` instead.
procio.c