Received: by 10.223.185.116 with SMTP id b49csp1502817wrg; Fri, 16 Feb 2018 22:29:19 -0800 (PST) X-Google-Smtp-Source: AH8x22666s2lSk1IQISZQd8VROUUGkkfw9GTydEn354qtVJcG7weHlmcKGdvIGzz9lywAr9sMciD X-Received: by 2002:a17:902:1486:: with SMTP id k6-v6mr8269120pla.376.1518848958904; Fri, 16 Feb 2018 22:29:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518848958; cv=none; d=google.com; s=arc-20160816; b=FRHKfwjO3f5IraQl7vUpdoxZKvT44w3fg94o7/pvPLELyjPNZqMP7uPO93Gew3iT0w hY5Bg6YMRS5EMHJB6AzPvDmvb+030EMpOyyviHc/Tz0DhBm23QWyBl67m/1DUP/keLOc U02bVNvpM84S9e8j0Z276Eo8rGRo4X/gRF8ZnZknA/U9j1QKp7i+jZgF5ejKP9GTHKl6 Swls2zodoVcy8y4RGatHd8UjULAFVoWXujwRjZtdz8B/MGMiICZIbtMqIRfS5whBdmyf WF5mttLx0z8ORr47JDlUNOGAFcdJ36viRNGKZZwEO4CXpuPEWtHxIEBycLMMvRm/o9AZ 7bPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=xtHwJ52sMmV7BQs5BJsBhg9gjWWzffiyapE7OpIB5wM=; b=yEfbcArJh+04Xucsw26An9UTxjwbKH8+7+jcNYtZLaKhodpoNtPZnaFCApriMT+0zE fp532SUnXVr8vOXrzfLVg1ZcTo7RmYXYf9bK0minnt+ZNo7V2rYnsNP36UqTp+nwtbfv py930Q5n2m9Dl+xV9Oe2OgP0neApiF8ToPxevCdRLXUVvHRBDeXRMGTI1bVGH47hUPva hjk71+j4T+Zp07LNn4rxn3eqGk4snQdsyHJt/BHtOaKEmAhBlZQv8/0duAhJR0I1oh2p TSq70Xs1uCifwesYr+qKYfAGHc8t0D8YnGsTjRS7+zr9/q71tcVlHtEsKbljn3yxrV9K WPGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si574362pgt.63.2018.02.16.22.29.02; Fri, 16 Feb 2018 22:29:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751076AbeBQG2X (ORCPT + 99 others); Sat, 17 Feb 2018 01:28:23 -0500 Received: from home.keithp.com ([63.227.221.253]:34412 "EHLO elaine.keithp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbeBQG2W (ORCPT ); Sat, 17 Feb 2018 01:28:22 -0500 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id A0FE93F2069D; Fri, 16 Feb 2018 22:28:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4U3SXY3sMevO; Fri, 16 Feb 2018 22:28:21 -0800 (PST) Received: from keithp.com (koto.keithp.com [10.0.0.2]) by elaine.keithp.com (Postfix) with ESMTPSA id E7B053F205D3; Fri, 16 Feb 2018 22:28:20 -0800 (PST) Received: by keithp.com (Postfix, from userid 1000) id 97A251582117; Fri, 16 Feb 2018 22:28:20 -0800 (PST) From: "Keith Packard" To: Kees Cook , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH] USB: chaoskey: Use kasprintf() over strcpy()/strcat() In-Reply-To: <20180217045530.GA24226@beast> References: <20180217045530.GA24226@beast> Date: Fri, 16 Feb 2018 22:28:20 -0800 Message-ID: <87k1vci0zf.fsf@keithp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Kees Cook writes: > Instead of kmalloc() with manually calculated values followed by > multiple strcpy()/strcat() calls, just fold it all into a single > kasprintf() call. > > Signed-off-by: Kees Cook Reviewed-by: Keith Packard =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlqHy4QACgkQ2yIaaQAA ABEcHQ/8DMwcxK/VzNBH0Tvpc7fWqVEqlwDUHhTjIktMzN7AHrMG6DyOEnqs2mmT cLSeYLVdUZQOopJ6Cc0aHtp2/V05T5d3BABhuQG8+/gPCXYi/ex0XmIKQoRGBkT1 vDg+Byn2PSzMall9EjP0V40lycEL9qYVZzV7OOi0Yi9xYnvEuzVp4o6fnqbpaCxl k7Tq5DKSvUJTmXMJbxoGaCWYMxuiL9KGTAmTbgZUOjw6+h4bLgblvGUm9Gz4wof+ W9Mnd7QeZH1m0ISrZbfCRBVkaphD9so1NJNNsMsYW2J0wP/wOBQGkFJ5O/quMsh/ gDFOkH5iAl1cftEz+S8JtauEm8243eQFxfmiP2sTRt58C4ArIfp0cz0Wop78AXeJ wvPT0sknolaOsQRYWVROKwbWomyvkzdKHNJlnaOnAMglHch8ck24tyeB7K+rWEF7 dLGTojV6+YETvw8q/cYzxYKExmnDu2/okrtKesGPc6T2UI4FCZMAtNEXqv45DDYr f6zNLPAxfrxoCweqjulI/5bIoyQmda5K1+cGhfwbTkX0Df81l8/nLAdINx0uNNj9 CSQNngk3ET1pE6HeRKD3Kydl0nw3oSDgFK6YCMmJ9ltrDXuC4hNewJqS0yyPdifb iYvyNw6dXV7xcVGHSc778ctM1G4eQtHGtT0/JyJLbbg/auaMtPM= =h6uX -----END PGP SIGNATURE----- --=-=-=--