[illumos-Developer] Webrev for bug 900: sed errors when -e is given a 0-length argument

Gordon Ross gordon.w.ross at gmail.com
Wed Apr 27 18:00:13 PDT 2011


On Wed, Apr 27, 2011 at 8:24 PM, Gary Mills <mills at cc.umanitoba.ca> wrote:
> This is for illumos bug 900: sed errors when -e is given a 0-length
> argument.  My webrev is at:
>
>    http://cr.illumos.org/view/vl7thda0/illumos900/

Thanks for debugging this.  Good find.  However,
I think I'd prefer to see the asprintf preserved, and
simply correct the check of it's return value, which
should be like this:

			if (asprintf(&temp_arg, "%s\n", optarg) < 0)
				err(1, "asprintf");

This also passes your test cases.

Gordon



More information about the Developer mailing list