History log of /openssh-portable/utf8.c (Results 1 - 25 of 25)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b8ae02a2 21-Aug-2018 schwarze@openbsd.org

upstream: AIX reports the CODESET as "ISO8859-1" in the POSIX locale.

Treating that as a safe encoding is OK because even when other systems return
that string for real ISO8859-1, it is

upstream: AIX reports the CODESET as "ISO8859-1" in the POSIX locale.

Treating that as a safe encoding is OK because even when other systems return
that string for real ISO8859-1, it is still safe in the sense that it is
ASCII-compatible and stateless.

Issue reported by Val dot Baranov at duke dot edu. Additional
information provided by Michael dot Felt at felt dot demon dot nl.
Tested by Michael Felt on AIX 6.1 and by Val Baranov on AIX 7.1.
Tweak and OK djm@.

OpenBSD-Commit-ID: 36f1210e0b229817d10eb490d6038f507b8256a7

show more ...


Revision tags: V_7_7_P1, V_7_6_P1
# 9e509d4e 31-May-2017 deraadt@openbsd.org

upstream commit

Switch to recallocarray() for a few operations. Both
growth and shrinkage are handled safely, and there also is no need for
preallocation dances. Future changes in t

upstream commit

Switch to recallocarray() for a few operations. Both
growth and shrinkage are handled safely, and there also is no need for
preallocation dances. Future changes in this area will be less error prone.
Review and one bug found by markus

Upstream-ID: 822d664d6a5a1d10eccb23acdd53578a679d5065

show more ...


# f8500b2b 17-Apr-2017 schwarze@openbsd.org

upstream commit

Recognize nl_langinfo(CODESET) return values "646" and ""
as aliases for "US-ASCII", useful for different versions of NetBSD and
Solaris. Found by dtucker@ and by Tom

upstream commit

Recognize nl_langinfo(CODESET) return values "646" and ""
as aliases for "US-ASCII", useful for different versions of NetBSD and
Solaris. Found by dtucker@ and by Tom G. Christensen <tgc at jupiterrise dot
com>. OK dtucker@ deraadt@

Upstream-ID: 38c2133817cbcae75c88c63599ac54228f0fa384

show more ...


Revision tags: V_7_5_P1
# db84e52f 19-Mar-2017 Damien Miller

I'm a doofus.

Unbreak obvious syntax error.


# 7ef1f9ba 19-Mar-2017 Damien Miller

Yet another synonym for ASCII: "646"

Used by NetBSD; this unbreaks mprintf() and friends there for the C
locale (caught by dtucker@ and his menagerie of test systems).


# 011c8ffb 18-Feb-2017 djm@openbsd.org

upstream commit

Add a common nl_langinfo(CODESET) alias for US-ASCII
"ANSI_X3.4-1968" that is used by Linux. Fixes mprintf output truncation for
non-UTF-8 locales on Linux spotted by

upstream commit

Add a common nl_langinfo(CODESET) alias for US-ASCII
"ANSI_X3.4-1968" that is used by Linux. Fixes mprintf output truncation for
non-UTF-8 locales on Linux spotted by dtucker@; ok deraadt@ schwarze@

Upstream-ID: c6808956ebffd64066f9075d839f74ff0dd60719

show more ...


# 3ec5fa4b 02-Feb-2017 jsg@openbsd.org

upstream commit

In vasnmprintf() return an error if malloc fails and
don't set a function argument to the address of free'd memory.

ok djm@

Upstream-ID: 1efffffff2f51d5

upstream commit

In vasnmprintf() return an error if malloc fails and
don't set a function argument to the address of free'd memory.

ok djm@

Upstream-ID: 1efffffff2f51d53c9141f245b90ac23d33b9779

show more ...


Revision tags: V_7_4_P1
# dda78a03 11-Dec-2016 Damien Miller

Force Turkish locales back to C/POSIX; bz#2643

Turkish locales are unique in their handling of the letters 'i' and
'I' (yes, they are different letters) and OpenSSH isn't remotely
pr

Force Turkish locales back to C/POSIX; bz#2643

Turkish locales are unique in their handling of the letters 'i' and
'I' (yes, they are different letters) and OpenSSH isn't remotely
prepared to deal with that. For now, the best we can do is to force
OpenSSH to use the C/POSIX locale and try to preserve the UTF-8
encoding if possible.

ok dtucker@

show more ...


Revision tags: V_7_3_P1
# f3f2cc83 11-Jul-2016 Darren Tucker

Check for wchar.h and langinfo.h

Wrap includes in the appropriate #ifdefs.


# df820722 05-Jun-2016 Darren Tucker

Add compat bits to utf8.c.


# cd9e1eab 30-May-2016 schwarze@openbsd.org

upstream commit

Even when only writing an unescaped character, the dst
buffer may need to grow, or it would be overrun; issue found by tb@ with
malloc.conf(5) 'C'.

While h

upstream commit

Even when only writing an unescaped character, the dst
buffer may need to grow, or it would be overrun; issue found by tb@ with
malloc.conf(5) 'C'.

While here, reserve an additional byte for the terminating NUL
up front such that we don't have to realloc() later just for that.

OK tb@

Upstream-ID: 30ebcc0c097c4571b16f0a78b44969f170db0cff

show more ...


# ac284a35 30-May-2016 schwarze@openbsd.org

upstream commit

Fix two rare edge cases: 1. If vasprintf() returns < 0,
do not access a NULL pointer in snmprintf(), and do not free() the pointer
returned from vasprintf() because

upstream commit

Fix two rare edge cases: 1. If vasprintf() returns < 0,
do not access a NULL pointer in snmprintf(), and do not free() the pointer
returned from vasprintf() because on some systems other than OpenBSD, it
might be a bogus pointer. 2. If vasprintf() returns == 0, return 0 and ""
rather than -1 and NULL.

Besides, free(dst) is pointless after failure (not a bug).

One half OK martijn@, the other half OK deraadt@;
committing quickly before people get hurt.

Upstream-ID: b7bcd2e82fc168a8eff94e41f5db336ed986fed0

show more ...


# 0e059cdf 25-May-2016 schwarze@openbsd.org

upstream commit

To prevent screwing up terminal settings when printing to
the terminal, for ASCII and UTF-8, escape bytes not forming characters and
bytes forming non-printable cha

upstream commit

To prevent screwing up terminal settings when printing to
the terminal, for ASCII and UTF-8, escape bytes not forming characters and
bytes forming non-printable characters with vis(3) VIS_OCTAL. For other
character sets, abort printing of the current string in these cases. In
particular, * let scp(1) respect the local user's LC_CTYPE locale(1); *
sanitize data received from the remote host; * sanitize filenames, usernames,
and similar data even locally; * take character display widths into account
for the progressmeter.

This is believed to be sufficient to keep the local terminal safe
on OpenBSD, but bad things can still happen on other systems with
state-dependent locales because many places in the code print
unencoded ASCII characters into the output stream.

Using feedback from djm@ and martijn@,
various aspects discussed with many others.

deraadt@ says it should go in now, i probably already hesitated too long

Upstream-ID: e66afbc94ee396ddcaffd433b9a3b80f387647e0

show more ...


# 9e509d4e 31-May-2017 deraadt@openbsd.org

upstream commit

Switch to recallocarray() for a few operations. Both
growth and shrinkage are handled safely, and there also is no need for
preallocation dances. Future changes in t

upstream commit

Switch to recallocarray() for a few operations. Both
growth and shrinkage are handled safely, and there also is no need for
preallocation dances. Future changes in this area will be less error prone.
Review and one bug found by markus

Upstream-ID: 822d664d6a5a1d10eccb23acdd53578a679d5065

show more ...


# f8500b2b 17-Apr-2017 schwarze@openbsd.org

upstream commit

Recognize nl_langinfo(CODESET) return values "646" and ""
as aliases for "US-ASCII", useful for different versions of NetBSD and
Solaris. Found by dtucker@ and by Tom

upstream commit

Recognize nl_langinfo(CODESET) return values "646" and ""
as aliases for "US-ASCII", useful for different versions of NetBSD and
Solaris. Found by dtucker@ and by Tom G. Christensen <tgc at jupiterrise dot
com>. OK dtucker@ deraadt@

Upstream-ID: 38c2133817cbcae75c88c63599ac54228f0fa384

show more ...


# db84e52f 19-Mar-2017 Damien Miller

I'm a doofus.

Unbreak obvious syntax error.


# 7ef1f9ba 19-Mar-2017 Damien Miller

Yet another synonym for ASCII: "646"

Used by NetBSD; this unbreaks mprintf() and friends there for the C
locale (caught by dtucker@ and his menagerie of test systems).


# 011c8ffb 18-Feb-2017 djm@openbsd.org

upstream commit

Add a common nl_langinfo(CODESET) alias for US-ASCII
"ANSI_X3.4-1968" that is used by Linux. Fixes mprintf output truncation for
non-UTF-8 locales on Linux spotted by

upstream commit

Add a common nl_langinfo(CODESET) alias for US-ASCII
"ANSI_X3.4-1968" that is used by Linux. Fixes mprintf output truncation for
non-UTF-8 locales on Linux spotted by dtucker@; ok deraadt@ schwarze@

Upstream-ID: c6808956ebffd64066f9075d839f74ff0dd60719

show more ...


# 3ec5fa4b 02-Feb-2017 jsg@openbsd.org

upstream commit

In vasnmprintf() return an error if malloc fails and
don't set a function argument to the address of free'd memory.

ok djm@

Upstream-ID: 1efffffff2f51d5

upstream commit

In vasnmprintf() return an error if malloc fails and
don't set a function argument to the address of free'd memory.

ok djm@

Upstream-ID: 1efffffff2f51d53c9141f245b90ac23d33b9779

show more ...


# dda78a03 11-Dec-2016 Damien Miller

Force Turkish locales back to C/POSIX; bz#2643

Turkish locales are unique in their handling of the letters 'i' and
'I' (yes, they are different letters) and OpenSSH isn't remotely
pr

Force Turkish locales back to C/POSIX; bz#2643

Turkish locales are unique in their handling of the letters 'i' and
'I' (yes, they are different letters) and OpenSSH isn't remotely
prepared to deal with that. For now, the best we can do is to force
OpenSSH to use the C/POSIX locale and try to preserve the UTF-8
encoding if possible.

ok dtucker@

show more ...


# f3f2cc83 11-Jul-2016 Darren Tucker

Check for wchar.h and langinfo.h

Wrap includes in the appropriate #ifdefs.


# df820722 05-Jun-2016 Darren Tucker

Add compat bits to utf8.c.


# cd9e1eab 30-May-2016 schwarze@openbsd.org

upstream commit

Even when only writing an unescaped character, the dst
buffer may need to grow, or it would be overrun; issue found by tb@ with
malloc.conf(5) 'C'.

While h

upstream commit

Even when only writing an unescaped character, the dst
buffer may need to grow, or it would be overrun; issue found by tb@ with
malloc.conf(5) 'C'.

While here, reserve an additional byte for the terminating NUL
up front such that we don't have to realloc() later just for that.

OK tb@

Upstream-ID: 30ebcc0c097c4571b16f0a78b44969f170db0cff

show more ...


# ac284a35 30-May-2016 schwarze@openbsd.org

upstream commit

Fix two rare edge cases: 1. If vasprintf() returns < 0,
do not access a NULL pointer in snmprintf(), and do not free() the pointer
returned from vasprintf() because

upstream commit

Fix two rare edge cases: 1. If vasprintf() returns < 0,
do not access a NULL pointer in snmprintf(), and do not free() the pointer
returned from vasprintf() because on some systems other than OpenBSD, it
might be a bogus pointer. 2. If vasprintf() returns == 0, return 0 and ""
rather than -1 and NULL.

Besides, free(dst) is pointless after failure (not a bug).

One half OK martijn@, the other half OK deraadt@;
committing quickly before people get hurt.

Upstream-ID: b7bcd2e82fc168a8eff94e41f5db336ed986fed0

show more ...


# 0e059cdf 25-May-2016 schwarze@openbsd.org

upstream commit

To prevent screwing up terminal settings when printing to
the terminal, for ASCII and UTF-8, escape bytes not forming characters and
bytes forming non-printable cha

upstream commit

To prevent screwing up terminal settings when printing to
the terminal, for ASCII and UTF-8, escape bytes not forming characters and
bytes forming non-printable characters with vis(3) VIS_OCTAL. For other
character sets, abort printing of the current string in these cases. In
particular, * let scp(1) respect the local user's LC_CTYPE locale(1); *
sanitize data received from the remote host; * sanitize filenames, usernames,
and similar data even locally; * take character display widths into account
for the progressmeter.

This is believed to be sufficient to keep the local terminal safe
on OpenBSD, but bad things can still happen on other systems with
state-dependent locales because many places in the code print
unencoded ASCII characters into the output stream.

Using feedback from djm@ and martijn@,
various aspects discussed with many others.

deraadt@ says it should go in now, i probably already hesitated too long

Upstream-ID: e66afbc94ee396ddcaffd433b9a3b80f387647e0

show more ...