Message ID | 20191119051412.003391715@linuxfoundation.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp154392ilf; Mon, 18 Nov 2019 21:32:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzXA5n9CBHuqV4irAi4wlpEdEfxDB+bqbMEaBrMWRo+VfppFZtIC9yucQ0gkFfmv7qb1KQo X-Received: by 2002:a17:906:394c:: with SMTP id g12mr31842919eje.233.1574141579560; Mon, 18 Nov 2019 21:32:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574141579; cv=none; d=google.com; s=arc-20160816; b=h+5Uf/ZJHsmk6Z6h8DrVriw0qY7/ZKsaRXoPv+Fwo9UtckfCQHHXgS+e2iv3pu3Iso n0tEcto4B773pTdnjnGhs3QIZhCFEGBHObA9Qy3ey4I1tnjeF9hrTtE32cvZOBpx+a84 V2LhL3EYSANgiELq0WcJEzSi9+9dYX/C4NVHX4XBs1gjGo8bzIk5XLuGwp52xmKHr46D nS9iBcDRql0r+i2wFHcsQ4zhoc2X849Z/6pxTGuU8qcKVuFTb++HztGQsbXmf0TtKbmN K103VzuXD9LJcpYrwp/T6uEZBIDUM/twmpGcqTzPXBUINSKV3FWrElh8qwESArLnhgSk S2NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ASV3Hlr9DOzOm6oXOSAboVm6lA65/oLsksT5KnGp6S0=; b=o5giJjjr2quKXDuAsg2RdW81Pi6P1MHR5zPEfBVaJzyFXWGr4OOKO44WT863H81Elr DoIBEFs99iPI2hpriA/8yWIVkqPIktgPB+d/LuNv1XQQavFyqR5hfKhfCu5jJY/yM5CF GBC3fqqzNSa5NGsU+XMbqULOpe91UFX7gWV7jMDDC4cS1RMIE0J8vuFMFenN/sYYSFaC p6MssTpwbLd2+Lgo+abzOcyoo27qIDCervMF0UtMRdgReoPc/4vTSJBOayVzobc3hjqT nvfu4JT8qwqupigtj36qJHX7tq8SZNlXsy9IPxxsKRhGNkBcsnO3zG3lZQ7h+EGQDsIc L6iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hEiXGqY3; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si13041915ejf.345.2019.11.18.21.32.59; Mon, 18 Nov 2019 21:32:59 -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; dkim=pass header.i=@kernel.org header.s=default header.b=hEiXGqY3; 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 S1728730AbfKSFc5 (ORCPT <rfc822;lee.jones@linaro.org> + 26 others); Tue, 19 Nov 2019 00:32:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:53328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727717AbfKSFcz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 19 Nov 2019 00:32:55 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42A9F21783; Tue, 19 Nov 2019 05:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141574; bh=UVs0BQCbS7l7vr5KRG0CBnk8B8+YWO9XidSyUtzdbGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hEiXGqY3qOQA0wrGiRflfQbjYLtWEM6inFY5WCDinad8bNvH6RklwZCAEMpmbD8xs HOUbUn3iDGOrbqiCt/mwMskc0WqDcE2EmF4Ku22KaM2v+OF7fOhsDIRbNoefZmYeFZ YgkRy+x3LPFF0qRhcZ3WNv9BNzA1GBmWvDFBuuBI= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Niklas Cassel <niklas.cassel@linaro.org>, Bjorn Andersson <bjorn.andersson@linaro.org>, Andy Gross <andy.gross@linaro.org>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.19 207/422] soc: qcom: apr: Avoid string overflow Date: Tue, 19 Nov 2019 06:16:44 +0100 Message-Id: <20191119051412.003391715@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051400.261610025@linuxfoundation.org> References: <20191119051400.261610025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c index 57af8a5373325..ee9197f5aae96 100644 --- a/drivers/soc/qcom/apr.c +++ b/drivers/soc/qcom/apr.c @@ -219,9 +219,9 @@ static int apr_add_device(struct device *dev, struct device_node *np, adev->domain_id = id->domain_id; adev->version = id->svc_version; if (np) - strncpy(adev->name, np->name, APR_NAME_SIZE); + strscpy(adev->name, np->name, APR_NAME_SIZE); else - strncpy(adev->name, id->name, APR_NAME_SIZE); + strscpy(adev->name, id->name, APR_NAME_SIZE); dev_set_name(&adev->dev, "aprsvc:%s:%x:%x", adev->name, id->domain_id, id->svc_id);