From owner-freebsd-arch@freebsd.org Wed May 25 21:26:50 2016 Return-Path: Delivered-To: freebsd-arch@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 61736B4AE78 for ; Wed, 25 May 2016 21:26:50 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::22d]) (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 2D9B31E35 for ; Wed, 25 May 2016 21:26:50 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ig0-x22d.google.com with SMTP id ww4so79461423igb.1 for ; Wed, 25 May 2016 14:26:50 -0700 (PDT) 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:date:message-id:subject:from:to :cc; bh=UekSu7Oja5wZuGC2Q66x2sda4U/bdgGVT/PcQ69lD2k=; b=EtpKYshkE1KLPTo8hPjUdDsh3+At42b9OvdmQb5vxYyP+N5c19GBOpej2EX8Hx29Zi wnXnvPKrnvObRJc+JD/9BAVGsydRk5Cpr0O4x6H8dNyU5rfTFJsb+Ob9CfoJy74lkJEU kk7I/n8x4CJbUVXdU9inxaythY5ItkMgZtd5xr5HHBpnDIPzLx6iQYm7tLkAt/N7/oPL IAGwAS/ezkZW8aod9f/+PC3fm06EGJ4a6rVvgXnuLsHbkBKyBf0ivTJQJQITJLQSxwUf 0qRYa5X8qIqO+kaac6205xKl5RHm93vFAqZ7eBjL+ulmpZUCrrEZQfcN9+Y3y3vlOcYM T3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=UekSu7Oja5wZuGC2Q66x2sda4U/bdgGVT/PcQ69lD2k=; b=GWRrs9E8kjDkjtrf8MuQMv426Mjgo/ZzdbqU3koq4+VWT+f5JD+hhcO2EQby4pPPgY Hz+wA8Kx/lpTPmclu1nw6LD3htNTx9wGgF6RtEvDvJhGb7i1F+qx5AQ24tzEpxQRAJ71 0WmDOKufhtSDcabtGMGI41g7KuKZmf6hL6AO77bDF2WDlkbRzb8hBB27BQ4+ltHvTwLV HEcTt/bImgKd6267k1qxu7quFPlRJ6E75YamHnRzIKydfS0lufsM3L/CWBMKKSfpCU3r UNDCDIWvU8PEm52+LWpwDleFcGuPr7xJS0m+cQE43lW2dhCBGRwvYRWLbG+onhDE3zFa CGiA== X-Gm-Message-State: ALyK8tLR6ecniOckYdUONXNb3/Am15/eqM3VQX2xhbZOIyp5kTgOGhhG+X4/mkUOfTUO0VGtQMIbVE6qvpc0yw== MIME-Version: 1.0 X-Received: by 10.129.162.141 with SMTP id z135mr3801999ywg.50.1464211609556; Wed, 25 May 2016 14:26:49 -0700 (PDT) Received: by 10.13.201.199 with HTTP; Wed, 25 May 2016 14:26:49 -0700 (PDT) In-Reply-To: References: <201605252114.u4PLE1NA007337@gw.catspoiler.org> Date: Wed, 25 May 2016 23:26:49 +0200 Message-ID: Subject: Re: is ut_user[] in struct utmpx NUL terminated? From: Ed Schouten To: Don Lewis Cc: freebsd-arch@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2016 21:26:50 -0000 2016-05-25 23:26 GMT+02:00 Ed Schouten : > Keep in mind that strcpy() is called with a size that is at most one > less than sizeof(ut->ut_user). The final byte in the array is never > overwritten. Sorry; strncpy() of course. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717