From nobody Sat Apr 30 00:20:11 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 528FA1AA9408 for ; Sat, 30 Apr 2022 00:20:19 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KqqkV2j1qz4lCF for ; Sat, 30 Apr 2022 00:20:18 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk1-x72d.google.com with SMTP id z126so7105466qkb.2 for ; Fri, 29 Apr 2022 17:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IbG59ND0Gk+2EXyDA0zPouK4lIGF/vO3yrqkU7WGq1A=; b=dLTfYEwaTM5do4X5JkTpY6CDwDf/PpTf99oOUyZAfp23Zu2ek+PEmIu4rcSILOw67J c2SomtYbbAWfMN6LXZgZhqzb0TNmwoUBENk+FwP4f8MoS6EE+lIufzyoTgETQHYVsAK7 VkMAAGDHNqzqFajeed3XzwTzN+VS6/HTxDn4kxs25BRAm1rYz2gWF1bILafMiElMlGc5 VmKn5mwTmQxfp4egflK/XoiZrpfmDFMyG8dvXWZOYJsYhl6nA+HL500VxeHztAwcu8HN CGkroQ0cHeskmOiXC8cCsZf+x3TcULtHwLhVgp2YRSFLugMvxZ+HtTlbrz9iA1tNeIjr N9lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IbG59ND0Gk+2EXyDA0zPouK4lIGF/vO3yrqkU7WGq1A=; b=gNxggrwuYHFbksLjoMuNVhu6m6jovX6504Fma9hNrUVksGSGxoF9kGpbvCZCZETrpF Wgf2H8IIwsD/qIkTZ+L8ZGyI27OUE/FhQ991YoM8pyHXNkKTvZ4zBr/jRK7hyeEBsF/O DTwE7QNlLLhn7qiI7kNs1NehX1zuIlf1Uar/92HvNaPuEWqz6If1+hEi4LL65pMr1TlM YSfFnZgA4WfBciI7E5kBMlRHCE/fBen4D8G4anRKTMMNsODK75dXD0j7xJpuYvdnw8TR OMO5Be1L0MB4CooPj4Zro+wFL9CPNgVn3fi0mbBMO5a0PQJs2NqurheEJYwd4u5OUn58 IirQ== X-Gm-Message-State: AOAM533aPb6PFfXy4fxwniStVY715+VMbJrAkjJ4CtrKpFOKiNULtFkh 02AKJdEIbWnsrw5iT84ChPOu1Sg/SBe+j6kr X-Google-Smtp-Source: ABdhPJzpxy/yToffyi+/b8SLQ1ERcFxr6nMX2y6Cs+AqF1dEWEu+p4wheeN6smi9Wh7OgNKGM0SAfA== X-Received: by 2002:a05:620a:4690:b0:69f:beb0:4e06 with SMTP id bq16-20020a05620a469000b0069fbeb04e06mr1273652qkb.591.1651278012416; Fri, 29 Apr 2022 17:20:12 -0700 (PDT) Received: from mutt-hbsd (pool-100-16-224-136.bltmmd.fios.verizon.net. [100.16.224.136]) by smtp.gmail.com with ESMTPSA id t1-20020ac85301000000b002f39b99f68bsm379279qtn.37.2022.04.29.17.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 17:20:11 -0700 (PDT) Date: Fri, 29 Apr 2022 20:20:11 -0400 From: Shawn Webb To: "Alfonso S. Siciliano" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 9b4c606b96ce - main - bsdinstall/partedit: Fix UFS auto partitioning Message-ID: <20220430002011.4zpqn3l4c3wsc3vm@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202204292324.23TNOusA058900@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fo5zonow3jpjyww7" Content-Disposition: inline In-Reply-To: <202204292324.23TNOusA058900@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4KqqkV2j1qz4lCF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=dLTfYEwa; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::72d as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-4.02 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.08)[0.084]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72d:from]; MLMMJ_DEST(0.00)[dev-commits-src-all]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[100.16.224.136:received] X-ThisMailContainsUnwantedMimeParts: N --fo5zonow3jpjyww7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 29, 2022 at 11:24:56PM +0000, Alfonso S. Siciliano wrote: > The branch main has been updated by asiciliano: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D9b4c606b96ce8a8b011dc50295= c71c38741a0f4f >=20 > commit 9b4c606b96ce8a8b011dc50295c71c38741a0f4f > Author: Alfonso S. Siciliano > AuthorDate: 2022-04-29 23:19:30 +0000 > Commit: Alfonso S. Siciliano > CommitDate: 2022-04-29 23:24:23 +0000 >=20 > bsdinstall/partedit: Fix UFS auto partitioning > =20 > Fix bsdinstall "Auto (UFS) Guided Disk Setup" and sade(8) "Auto". > The problem is a string comparison failure, it arose during the > dialog(3)/bsddialog(3) form conversion: > =20 > * dialog uses only form.text while bsdialog differentiates between > form.init and form.value. > * dialog always allocates memory for form values while bsddialog only > when a button is pressed. > =20 > Reviewed by: bapt > Differential Revision: https://reviews.freebsd.org/D35033 > --- > usr.sbin/bsdinstall/partedit/gpart_ops.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinsta= ll/partedit/gpart_ops.c > index 65cda247e146..26aedb58ef39 100644 > --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c > +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c > @@ -1154,6 +1154,12 @@ addpartform: > init_allocated =3D true; > goto addpartform; > } > + } else { /* auto partitioning */ > + items[0].value =3D strdup(items[0].init); > + items[1].value =3D strdup(items[1].init); > + items[2].value =3D strdup(items[2].init); > + if (nitems > 3) > + items[3].value =3D strdup(items[3].init); > } > =20 > /* >=20 Hey Alfonso, Would it be a good idea to check the return value of strdup in this particular case? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --fo5zonow3jpjyww7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmJsgLgACgkQ/y5nonf4 4fo2Tg//bS5JdhP2D3KqBTEAxL6I6zezVgsEWy1eyxMWqthms8ysj+RzmsQDn9iz qnCuZuhG9W8l2/RrdMgGTmhRKrOh26S0dCSPh9E6sMGtxNxwos+F4mEiS+4t/RnI YHN9XenHh2jAGYD7khqRZHsNb5ZXJgi7DvYfPsrSReOHkdHvtfwQGNce2kYp7rqR 42/Uz1kSCSp/HWWFNoCgm9bx7LQTRy2ZaIQxCC3eXXKKv1KiQ4Gdi6XwJiCoxfKe froDACNEHSKY3OwkU6ao6hDy+JIOQvke3dpjlOXurg9MGEs2kLWfkN7qwtS39lUk OMrM/Qppk4nIhzevKHWVyWrJF6EJe9jwqNn8IOJfILnsnmfn/dmHCSNZLFvl/Rnr d4QPj0I0lFaUyXa4B4qVHuFLwrZt9y7CCcg/QouebLKpahf0vH0UibYfze5Q06pt ZVxAU+YWEMhmY2SX5UMNzt2z4pMBfCLK4kGN9qi8+3LXgG0YMKYuO2nWCKmn+Ibc WGb8CTP4EZC1dcQYgDxJkB3YOp+8iqXfVdUCZKXAbRFdNvuIQgOnByJQkUuWUDe3 6tH0058iUmD4otTpbwxbIji5KVKdQJflaH++ZjyQlz+++CdOhASegu0wCRGJjz+T T+eO6aVpW29nzBgbY6AcPxT4jWqKtUh1vye4WEOx1MM6KhQdR5M= =ExHK -----END PGP SIGNATURE----- --fo5zonow3jpjyww7--