svn commit: r343634 - head/usr.sbin/bhyve

Marcelo Araujo araujobsdport at gmail.com
Fri Feb 1 01:42:27 UTC 2019


Em sex, 1 de fev de 2019 às 09:21, Konstantin Belousov <kostikbel at gmail.com>
escreveu:

> On Fri, Feb 01, 2019 at 09:05:37AM +0800, Marcelo Araujo wrote:
> > Em sex, 1 de fev de 2019 às 09:01, Konstantin Belousov <
> kostikbel at gmail.com>
> > escreveu:
> >
> > > On Fri, Feb 01, 2019 at 08:40:11AM +0800, Marcelo Araujo wrote:
> > > > Em sex, 1 de fev de 2019 às 08:36, Warner Losh <imp at bsdimp.com>
> > > escreveu:
> > > >
> > > > >
> > > > >
> > > > > On Thu, Jan 31, 2019, 4:46 PM Konstantin Belousov <
> kostikbel at gmail.com
> > > > > wrote:
> > > > >
> > > > >> On Thu, Jan 31, 2019 at 11:32:19PM +0000, Marcelo Araujo wrote:
> > > > >> > Author: araujo
> > > > >> > Date: Thu Jan 31 23:32:19 2019
> > > > >> > New Revision: 343634
> > > > >> > URL: https://svnweb.freebsd.org/changeset/base/343634
> > > > >> >
> > > > >> > Log:
> > > > >> >   Mostly a cosmetic change to replace strlen with strnlen.
> > > > >> This is not cosmetic, and more, for instance the usage() part of
> the
> > > > >> change
> > > > >> does not make any sense to me.
> > > > >>
> > > > >
> > > > > I specifically objected as well and was blown off. What gives?
> > > > >
> > > >
> > > > I have asked you feedback and got none! I will revert the usage()
> changes
> > > > later then.
> > >
> > > I noted the usage() chunk because it is the first one in the commit and
> > > I stopped after I see the obvious issues with it, not because it is the
> > > only wrong part.
> > >
> >
> > Are you implying that all the patch is wrong?
> > I have no problem to revert it at all if you give me the right reason, it
> > was basically a port from another project that also uses bhyve.
>
> By default, all uses of strncmp() and strncpy() are bugs.
> Your commit message have no explanation what the change fixes/improves.
>
> So I looked at the second chunk, for smbios_generic_initializer(). It
> also seems to be wrong.  If template_string[i] length is greater than
> SMBIOS_MAX_LENGTH, then the copied string is not nul-terminated. If its
> length is less than the constant, then what is the point ?
>
> I also looked at the third chunk, smbios_type1_initializer().  I cannot
> understand the reasoning behind it, at all.
>
> Only usb_mouse.c is left, I do not expect anything good from it.
>

Thanks kib, I will recheck the patch and open another review!
I will revert this commit in a few.

Best,

-- 

-- 
Marcelo Araujo            (__)araujo at FreeBSD.org
\\\'',)http://www.FreeBSD.org <http://www.freebsd.org/>   \/  \ ^
Power To Server.         .\. /_)


More information about the svn-src-head mailing list