From owner-svn-src-all@freebsd.org Sat Jan 27 22:21:30 2018 Return-Path: Delivered-To: svn-src-all@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 4C73AEC6782 for ; Sat, 27 Jan 2018 22:21:30 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (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 B51577C9DA for ; Sat, 27 Jan 2018 22:21:29 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-lf0-x22a.google.com with SMTP id t139so4905310lff.0 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=dWi2vsnXBvOGYvGuj0PdWiJgUO2vmaV+CDqUZDuX8D7qv9rGl5OUBCt2Tw3/AwAR3R qDM8V5UWozwW+fZJOD+nuU8kVpN/zw+o8vAb0GoVcITPpcPfwE5ihupuOm0X2iusdb0c GP8b9DA0sLAkKSy+6PLQ81AZEiH9bs2+y2dI6L9EYReKc0ActKm7sxXrK0/zK3CJuQk1 /uyDr/UgKer+tiuUvOhQScTMSNwFnAtimfKFb6YWFz35vd8QIqoU/idNK+MWHznAAhCQ iYQ98j0/UmwkVgd6Y0pTU9Uv8WTM7mhcttDz4DJ9/3V4ZAlA7UJ5utr3MCZLJPqRnKts ZGww== X-Gm-Message-State: AKwxytfVjyLwyZysIjh9dLJuQUZnU/sTc+TxdUUst9gLlZNoPG3V9j5B ccSEl2/cRaKcUHSvETEUfc+SP5b0yOnDEHM3pNdRdA== 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-all@freebsd.org X-Mailman-Version: 2.1.25 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: 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