Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2018 23:31:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 233343] the sh(1) bind(1) builtin segfaults when stdout is redirected in 12RC1
Message-ID:  <bug-233343-227-pfUphlKJtX@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-233343-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-233343-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233343

Jilles Tjoelker <jilles@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open

--- Comment #3 from Jilles Tjoelker <jilles@FreeBSD.org> ---
I notice a bug in libedit. The function map_bind() in lib/libedit/map.c ass=
umes
that the argv array ends with a NULL string pointer, but the documentation =
for
el_parse() does not say this is required and the implementation of
ct_decode_argv() does not make it such. As a result, memory out of bounds of
the allocation is accessed.

Since applications calling el_wparse() cannot be assumed to add the NULL
sentinel, functions like map_bind() should be adjusted (there may be more
places making this incorrect assumption).

By the way, I don't think the approach of converting strings into wchar_t
strings (that is, UTF-32, most of the time) should be repeated in new code.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233343-227-pfUphlKJtX>