diff options
author | Heiko Hund | 2020-02-06 14:21:00 +0100 |
---|---|---|
committer | David Sommerseth | 2020-02-20 16:38:58 +0100 |
commit | 4ed7bf7f94a8cecbc2430d8025a2b8a46f94e429 (patch) | |
tree | d5bf5610ebe708666f2d2c94fca1dc7c68d698e4 /src/openvpn/socket.c | |
parent | 5bb71ab599a6c382b6bdc9e9cb449d11d64353b8 (diff) | |
download | openvpn-4ed7bf7f94a8cecbc2430d8025a2b8a46f94e429.zip openvpn-4ed7bf7f94a8cecbc2430d8025a2b8a46f94e429.tar.gz |
re-implement argv_printf_*()
The previous implementation had the problem that it was not fully
compatible with printf() and could only detect % format directives
following a space character (0x20).
It modifies the format string and inserts marks to separate groups
before passing it to the regular printf in libc. The marks are
later used to separate the output string into individual command
line arguments.
The choice of 0x1D as the argument delimiter is based on the
assumption that no "regular" string passed to argv_printf_*() will
ever have to contain that byte (and the fact that it actually is
the ASCII "group separator" control character, which fits its
purpose).
This commit has been updated by David Sommerseth based on Arne
Schwabe and his own feedback on the mailing list.
Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20200206132103.15977-2-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19380.html
Diffstat (limited to 'src/openvpn/socket.c')
0 files changed, 0 insertions, 0 deletions