From owner-svn-src-head@freebsd.org Wed May 4 00:06:06 2016 Return-Path: Delivered-To: svn-src-head@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 2717DB2B421 for ; Wed, 4 May 2016 00:06:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001:c05::22e]) (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 EAD551CA5 for ; Wed, 4 May 2016 00:06:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ig0-x22e.google.com with SMTP id s8so34695375ign.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=cU3e1P8BGvZm/ANVMCTzleSdvZFCD2rvVQHIVBCjbZAupTHocK2016EHAANDiR75g2 8zYfXhN6ArlyLLxDW4xxmHQUgbCwafx7gz3IqAyB6OZ4TR7lmZoirbaV+3ULzNZa2k2G eKeLvYmFWsXOUZHyoj5DmSgjib/rFhXKuiTFRD4Aa4xNfbfhJ2587yLh9kyMjz0Pn7G7 crIxJ2fWFKRlcUZUMJxT5Ljcw4CJL4a4xkqDzdutVDRhP/hgg16YD767Tm2eVw+kjNSu P9txx8uW4daHeFCxUl97CXlYYFyPfJ0bBpfkKVkMiqWW87jFZfkEmd8Z/peHrfKqTtdm IRTg== X-Gm-Message-State: AOPr4FWmoaA+MDrNKJt2wMh43o47Z6VRICQKqbFKpDRtVTikniQvw+xfWVwQvnqbbsiSljHNVeee4i9vYxXHFw== 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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