From owner-svn-src-all@freebsd.org Wed May 4 00:06:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D428B2B422 for ; Wed, 4 May 2016 00:06:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EAD141CA4 for ; Wed, 4 May 2016 00:06:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ig0-x231.google.com with SMTP id bi2so132549136igb.0 for ; Tue, 03 May 2016 17:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=Yr8S+b+m3bBpp4ASaDJz0IzUrLf2X5xKMVBPcVYVNsA=; b=eocq6HiQeM7qfwx49W1TSPUjSMKBwoHtUaEuF8TRAYFhBYhn4pqGtZUZNXNctbFgTx DwJQQ4b5mn8K1rNE7xpzU2jaZvUhGHzllZC9oh8puIBoUHWqaKzMrNZQ1rD6TcQ4aUmJ bq0llS2Y44kZu+vwY2nDIqFToeAxFG4lTgaK+K1ngcGTxtkMau77aVy3l/PnR6LNhZnl 3t0HMzPqb93u3gXXfQH9tdGeFCDZB8pxsXsAYwwiYeLWNkTQaHa5H4vQw8Ik0M7eZtRI l0+gKq+/MkltaVtMVDkFNHOFRked1GNKU8rIko0oo3yyvFMRHwvhSMUv0WFlCNLDCBpO fKUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=Yr8S+b+m3bBpp4ASaDJz0IzUrLf2X5xKMVBPcVYVNsA=; b=Zs5pCk+Kc5OUDHvlbbCm0wJgztjszs3WiIYoaZKmV57/ZY48jle8nX9oRvvwAEM34A jCuGtefPCodbt/3QmPEYCvhqse8XGBt2J2U0OwDZfS7X1bvmM0mULd1kUE68aDVklfn9 zCTwrdtVACU9KcTNIEhxWCdHqqswnIuZNVl3EHavOgE7USaW6SRtge12261sDZhbtCck kjK+gexPLFJVAEFsDD3ha8Is6cNlaRJJ38JQ7lrcmD4sxt2bH+4XpuWLk+6yhBHiaCKV 83o17QloyNGpWSi6pAU2K4ENJHGzj4FYkocHfWYjyQLvotBfZb9jsKL5X8GeIn98UY9c TWaw== X-Gm-Message-State: AOPr4FWyBY+A6Ep3fvkAETAxQomXiz3sjl/A2stlPavNktki3IEQTcYjjviJvksbh0tldUheOKIVfG70lMItkQ== MIME-Version: 1.0 X-Received: by 10.50.160.195 with SMTP id xm3mr6959907igb.12.1462320365266; Tue, 03 May 2016 17:06:05 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.79.75.68 with HTTP; Tue, 3 May 2016 17:06:05 -0700 (PDT) X-Originating-IP: [2607:fb90:1907:756c:0:46:b68d:5a01] Received: by 10.79.75.68 with HTTP; Tue, 3 May 2016 17:06:05 -0700 (PDT) In-Reply-To: References: <201604262059.u3QKxLDl045059@repo.freebsd.org> Date: Tue, 3 May 2016 18:06:05 -0600 X-Google-Sender-Auth: 9wqOyP2KdL-SLM2IjbHxVY2XPZs Message-ID: Subject: Re: svn commit: r298665 - head/sys/dev/aacraid From: Warner Losh To: "Conrad E. Meyer" Cc: src-committers , svn-src-head@freebsd.org, Oliver Pinter , svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2016 00:06:06 -0000 On May 3, 2016 2:38 PM, "Conrad Meyer" wrote: > > On Tue, May 3, 2016 at 1:29 PM, Warner Losh wrote: > > > >> On May 3, 2016, at 1:44 PM, Conrad Meyer wrote: > >> > >> On Tue, May 3, 2016 at 12:00 PM, Oliver Pinter > >> 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=E2=80=99t 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