From owner-svn-src-head@freebsd.org Sat Jan 27 22:21:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2566EC6784 for ; Sat, 27 Jan 2018 22:21:30 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com [IPv6:2a00:1450:4010:c07::235]) (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 05E107C9DB for ; Sat, 27 Jan 2018 22:21:30 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-lf0-x235.google.com with SMTP id q17so4874621lfa.9 for ; Sat, 27 Jan 2018 14:21:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Dtt7EaHPwSOiHCAo0RCHWnLOnevmBytyRbBXzkwueS4=; b=qy/LlzMFFrSAGaY/pNUtNcXOzUObJ44nJmleJE38vpR8UK7ycTkT6o4dwIAVusmKH7 7CSq2N3hLSbNm1qLigkXytRlGOXaBh7HziiRfFajNNJALk3eGQFBOqbp4O4I1gxSRwXs tJ5CuBVMdoECGemFrw/I7kXky962zzIKnf1py93fIpEsBQdXfXl2RaIR2kFyYMM3BtSE ttCNo6Hri+mIKl35N8L9mzdMO7WhoRjJ1OmqpgRdJA1fpD57fyA8zcux39cEu02mwwcE jz3nBK/afbYFB0yx5KaurwIzvWPy5wmviTXwni9vYIazGfDv1RwG4hmTi5cA+YVJExgT p1ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Dtt7EaHPwSOiHCAo0RCHWnLOnevmBytyRbBXzkwueS4=; b=T81lLMs6/8rucJzbpdaS+ypVtpL+PtBS3aXTXWEiRrWt2Nn1s9CvX/7Fe1pA14DOJY Cg/zmc0yHqQiEIM1hBzlIxdlTOy3bzxkc/0AsRUB5xPVAlOp2wZOCS/n3xM23E9Qua/6 WtVDbkjRV38Nvhsqipm3trNzPfugYttTY/oCo3fqsblBTCoivjmpj3YMX2mG9yreWVyQ cGPmMtX5GOLA+ARcea86Aky/9HtHnLQgRqoYjhX8eyEtynYCjX7HtmpV3+8UQcQAZloz MRFOn+eUbkftjkmpztg9WvIYnRdRbEnt8hoGx/P7Jzpw4mZJOqWyWQPLEhplqrC6Wh+M gt2g== X-Gm-Message-State: AKwxytcHvBHYYTRYAQfoASo6TmsX4FtMv4gl04zlfuvk3iamfNsSTVoG J2U+xjvq6zYItLTvu6kwrWTFxRafP9KM5hMPrinq5Q== X-Google-Smtp-Source: AH8x226LQhrch5v89vAyl4Eowq247xvtCubSGDegJ9TEXgAllBDulH5PG0A7wGp1OBYC0ywlOs65PQFb+TYCLrwcDUI= X-Received: by 10.25.20.168 with SMTP id 40mr10845246lfu.23.1517091687713; Sat, 27 Jan 2018 14:21:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.216.206 with HTTP; Sat, 27 Jan 2018 14:20:57 -0800 (PST) In-Reply-To: <201801272216.w0RMGJwo057492@repo.freebsd.org> References: <201801272216.w0RMGJwo057492@repo.freebsd.org> From: Ed Schouten Date: Sat, 27 Jan 2018 23:20:57 +0100 Message-ID: Subject: Re: svn commit: r328492 - head/contrib/opie/libopie To: "Pedro F. Giffuni" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Sat, 27 Jan 2018 22:21:30 -0000 Hi Pedro, 2018-01-27 23:16 GMT+01:00 Pedro F. Giffuni : > char host[sizeof(utmp.ut_host) + 1]; > insecure = 1; > > - strncpy(host, utmp.ut_host, sizeof(utmp.ut_host)); > - host[sizeof(utmp.ut_host)] = 0; > + strncpy(host, utmp.ut_host, sizeof(host)); Wait... This may access utmp.ut_host one byte past the end and no longer guarantees that host is null-terminated, right? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands