summaryrefslogtreecommitdiffstats
path: root/lib/libedit/tokenizer.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-03-20 19:14:29 +0000
committerschwarze <schwarze@openbsd.org>2016-03-20 19:14:29 +0000
commit8f65425a5240737682ec3a186e1291183e222e5a (patch)
tree954faaa3b43071c6383ba2cf7a5b2c8cf8a8aebb /lib/libedit/tokenizer.c
parentFix read_char() for the non-UTF-8 case, in particular for systems (diff)
downloadwireguard-openbsd-8f65425a5240737682ec3a186e1291183e222e5a.tar.xz
wireguard-openbsd-8f65425a5240737682ec3a186e1291183e222e5a.zip
Fix the public interface function el_getc(3).
On OpenBSD, the effects are to set the return argument to the NUL byte in case of a read failure (for robustness) and to properly set errno when the character is out of range and cannot be stored in a byte. Once we enable UTF-8, this will be needed to avoid returning bogus bytes for valid Unicode characters. On systems where the internal representation of wchar_t doesn't match UCS-4, breakage was potentially even worse. OK czarkoff@.
Diffstat (limited to 'lib/libedit/tokenizer.c')
0 files changed, 0 insertions, 0 deletions