Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp5488rda; Fri, 20 Oct 2023 17:53:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7kFTVKTzbEiNshW+VCXmvvzUgwXHqWjmhDwjfC+L9XHMLSV2+h98zmYvcxYhJEgNrG5TZ X-Received: by 2002:a05:6870:5b88:b0:1e9:8eaf:c369 with SMTP id em8-20020a0568705b8800b001e98eafc369mr3462919oab.43.1697849639274; Fri, 20 Oct 2023 17:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697849639; cv=none; d=google.com; s=arc-20160816; b=atBSG8oyokotjN0aY/j0NnAY4QVWXuENWDSy/sPxhQEZhOxWDQeBfqcW3o3Joo20We bGi88qZC6vHzy2uZDGci/vJNU+C7l4rALXg6ZNPNROoYmBu6DND/ajxop2k8ywafHLjR umT7cUDoHz7R3kpiXJrnYPRtyX+qxI4m1lGPnbTyRdoeWgM2TLLXmqGfd7JyOwePquX8 aSUxCain3JCPtdF6lCXrk0ouJXg+PTcf2dja/dHBXjihJ/irVWb4iCI4CV+roXgxMLzT klvFHHc37OuUoiX1p7fxi8PN6TCZ7XLBPmHk7mrNNf/1pVrqRazDrBIPN1U0M6RnTRZZ 1IFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=UJg2ACoHbiBVvtMsJIrrgZY6jaYIqlHv1ZKMCUItmN8=; fh=99Ip3VeEKWStP8h2IHV7VEScOr5coUmUuhXJp8WxueA=; b=wWV/rWXROUCeQ4HDRAS0Z4nGtEo3mvjWyGyoIk+EjdnkhYte39SQILWY6N5F0aix/V f/bGNwzO7QSp+2AZpB1+jRXoX+wBxjinY4H1SZdJJZnIjmsIsIrkW6F88njFjosNlVO6 Bcxpan8faq6Fs1ypqa/Yz4FaqtJFPepV/qYXB7b4vtVBPeYnTq+FxgY6eHR8i8ArDcJ/ MVSEKiGXyWeQFRKTSwvqeLtDxPToDYvb+lpGGn7IIIdn4qJ0eQI0EGSUpmRlA9iKgblB yfKFvDOEfnjLbZ2WqZGzl+nAwMYhlzkZs0PT+NPBA0hxrPcj8iRokkBUROwkL04aLbqY LU1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fvlq2Ap9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 199-20020a6300d0000000b00563e283786esi2679922pga.104.2023.10.20.17.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 17:53:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fvlq2Ap9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4624D83421A7; Fri, 20 Oct 2023 17:53:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233279AbjJUAxk (ORCPT + 99 others); Fri, 20 Oct 2023 20:53:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233040AbjJUAx2 (ORCPT ); Fri, 20 Oct 2023 20:53:28 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5760D6A; Fri, 20 Oct 2023 17:53:22 -0700 (PDT) Received: from mercury (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id DE7956607354; Sat, 21 Oct 2023 01:53:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697849597; bh=WQtMmmdfFYxzlLqdJLNkwqz7BRAwlXLZctRc3du2U0k=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=fvlq2Ap9K9hHaUlhVNXjwcrhWDHHgXpWATJi2ha/KmS1qDYfDPdmsk2jFWUfPFza8 CsXsMWu3ziYDqHUPetKg1OcEHsc7KpO2l7GYO9/V8/siNCJdaCG8clagnv3Ju+xzKz aw1SFb11b6X3BsmP6aJKLamF+vkMiriXz9QQG9EpbDBOaULSoYOBngWhuyZiWIlPOV ENtKG4/lMzhl59u/OY9qD4m8h39czyRepi7irKlcSlLENC420AsH6Z+C3L2dTR92lq tj4jZWnxAvBZvticqho2WXgOT6Tg72S1J7kV0YnuxP1iR/rF7g0ZZ5Pu4udFwSoSvm aMQF2o2nOFNrQ== Received: by mercury (Postfix, from userid 1000) id 3F6481066144; Sat, 21 Oct 2023 02:53:11 +0200 (CEST) From: Sebastian Reichel To: Maximilian Luz , Sebastian Reichel , Justin Stitt Cc: linux-pm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org In-Reply-To: <20231020-strncpy-drivers-power-supply-surface_charger-c-v1-1-93ddbf668e10@google.com> References: <20231020-strncpy-drivers-power-supply-surface_charger-c-v1-1-93ddbf668e10@google.com> Subject: Re: [PATCH] power: supply: surface-charger: replace deprecated strncpy with strscpy Message-Id: <169784959125.1512524.2877665109633637893.b4-ty@collabora.com> Date: Sat, 21 Oct 2023 02:53:11 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 20 Oct 2023 17:53:58 -0700 (PDT) On Fri, 20 Oct 2023 19:46:11 +0000, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect ac->name to be NUL-terminated based on its usage with format > strings: > > [...] Applied, thanks! [1/1] power: supply: surface-charger: replace deprecated strncpy with strscpy commit: afc88dfda013970bb1e214b331e99adca2f98312 Best regards, -- Sebastian Reichel