[illumos-Developer] Webrev for bug 900: sed errors when -e is given a 0-length argument
Dan McDonald
danmcd at nexenta.com
Wed Apr 27 17:41:25 PDT 2011
On Wed, Apr 27, 2011 at 07:24:02PM -0500, Gary Mills wrote:
<SNIP!>
> It was fixed by reverting to the freebsd code for option handling.
> This minimizes the changes needed to port it to Illumos. While
> `asprintf' is handy, it's only used in that one place in the sed
> source. There's no need to introduce it in this case.
Seeing vanilla strcpy() with two variables for arguments (one from user
input!) raises my hackles, but the strlen() on the user-input string
*probably* provides a sufficient correctness predicate. Some automatic
source-checkers will probably complain about this, though.
Comments are nice to assuage such fears. ;)
Otherwise it's okay.
Dan
More information about the Developer
mailing list