svn commit: r298665 - head/sys/dev/aacraid
Warner Losh
imp at bsdimp.com
Wed May 4 00:06:06 UTC 2016
On May 3, 2016 2:38 PM, "Conrad Meyer" <cem at freebsd.org> wrote:
>
> On Tue, May 3, 2016 at 1:29 PM, Warner Losh <imp at bsdimp.com> wrote:
> >
> >> On May 3, 2016, at 1:44 PM, Conrad Meyer <cem at FreeBSD.org> wrote:
> >>
> >> On Tue, May 3, 2016 at 12:00 PM, Oliver Pinter
> >> <oliver.pinter at hardenedbsd.org> wrote:
> >>> strlcpy instead or adjust the p->vendors size?
> >>
> >> Neither. The buffer is intentionally not nul-terminated. The
> >> coverity reports are false positives.
> >
> > Then wouldn’t memcmp be better?
>
> No, memcmp doesn't do anything like strncpy. memcpy wouldn't hurt but
> I don't see any reason to change it.
It just sounded like these were fixed length fields with no NULs ever.
Memcpy would convey that to the reader. But you're right. It isn't a huge
thing.
Warner
> Conrad
More information about the svn-src-head
mailing list