On 20 Jul, Tim Čas wrote:
> On 20 July 2016 at 20:33, Don Lewis <truck...@freebsd.org> wrote:
>> wc(1) has problems with its multibyte support pointed out by Coverity
>> as I recall.
> 
> Not sure how critical that issue is (e.g. byte counts [`-c`], line
> counts [`-l`], and such should still work as intended; whether word
> counts work or not depends on whether we should count Unicode
> whitespace as, well, whitespace). I do wonder if everyone agrees that
> an effort should be made towards UTF-8 default, though?

It passes a fixed-length non-NUL terminated buffer (returned by read(2))
to mbrtowc().  In addition to the lack of termination, the buffer could
also contain a partial character at its beginning or end if the contents
are UTF-8.

The Coverity ID is 978825.

_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to