[illumos-Developer] webrev: 1046 wcsxfrm(3C) crashes when len arg is 0
Garrett D'Amore
garrett at nexenta.com
Thu May 19 00:27:45 PDT 2011
Ah, I had forgotten the calling semantics of wcsxfrm... you have to return the length, so you have to do the full processing. Thanks for reminding me of that. I agree that given that Gordon's fix looks quite reasonable.
-- Garrett D'Amore
On May 19, 2011, at 9:23 AM, "Richard Lowe" <richlowe at richlowe.net> wrote:
> On Thu, May 19, 2011 at 01:39, Garrett D'Amore <garrett at nexenta.com> wrote:
>> I think I'd prefer a simple test for len == 0 at the top of the function.
>> If you do this, then you can avoid the other tests for it throughout the
>> function, yielding simpler code. However, I'm ok with the change as you've
>> written it too, its just not as clean as I think it could have been.
>>
>
> I can't come up with a way you'd do that and still get the correct return value?
>
> -- Rich
More information about the Developer
mailing list