From patchwork Sun Jul 4 15:01:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1500440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Dpk+aJQX; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=pdwUh4Sn; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHsTw4Lffz9sWX for ; Mon, 5 Jul 2021 01:01:40 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=engKk8MdHZSEaIUU8OYlEhQgzSW1qpeIGIjFeHRkJ8M=; b=Dpk+aJQX0RI3jI tzpXtg7TGndQ7FOJKXTAadTUbm7wk0y4kKolQ6F3tYB8p1gONey0tqOiw6bH4tF4DICkemfJHvNwS guFls+e5LHk6hLhtYAGug+l7nl+9CwptywYaMqyiQ9b7HkcDoGPRqnhYyF9/Xi5e8sXUD3rVBbRvG EDbGjckW7MxPKW2j+KWR5f/oYCxjdBfgmTo7GYyRR5obKU6Y34rtvS8s/l5AvAL+2gMsZFy3teuKG 2ebW8nRwsy4Vy8umf0kFc2aDCnX+R09lAhrCZ1Ryx1L7gZOGRa7xhxgzSVqfmAIQPa9qv4ieMAm1g QbNlNYONgLvTKESH74jg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m03cj-006QSK-6z; Sun, 04 Jul 2021 15:01:33 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m03cg-006QRQ-TA for opensbi@lists.infradead.org; Sun, 04 Jul 2021 15:01:32 +0000 Received: by mail-pg1-x533.google.com with SMTP id d12so15454862pgd.9 for ; Sun, 04 Jul 2021 08:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uvPbGMamXSQ4ZwxFLkwjIVF4HRrTvl7+oyzVdQ9lOtc=; b=pdwUh4SnHgfnZt5CHT/RpWUA2/LCAX2FuPzPgoJuqt20+WOU9NQ77GXwOq3k+lBaUX rlKuiMepStRKhTJMYOR9dtgUJ7+Y//dbhR9M5/7T6fYHzuwgSUL6avr0iJirLcy8q+8M ouvnmpr+jK32Y5Yl2TIY2XwtnMGIECySMO02Xu9I1M9cHUbz6XtcqXGMyV46dSyqqUj2 VeILXnAqzsouVdaV/aK/0LzIINR88ShbRgpQ6Hjr9pjx/8r8c8a/QC1nYKMhu/5Hbgae V3mVnNEdhwm0OwjlC1BdXhs/tkxzn+0rFVDmUJMwQc6/GsavEfffJslQuSdkfxPCN5ty wZ8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uvPbGMamXSQ4ZwxFLkwjIVF4HRrTvl7+oyzVdQ9lOtc=; b=i6AyfbeDsEMXarqSVN4/GE9h3zHGJFPWi3bCFPismWWa5ZE5MEeDT8NTJKhgHlQwxV JFrVYU2nVo7jXs0EoIjYDMD8hR5hSfSxlaIhUGguDL97dxZG7S//RshJ3y+n//6AzbFE Ps1vL3QD60JI1PDtlSWOvBhrvqzsbP2AjyjVaJK9YAom/wtrpYd+fHAQ//Ehl3f1QiXu XXymqVvojU/7/vBqzfgQlIaeeTlPe/4/2P8dYIKo1sNnxwumBxZwA0IwQ8Gatf07XODH WEt7i/iETm0D+HOJ0wckaT7+ExNT+DdR/tBBDvab02RhtNi+sS1QIrm9wnyckvTslXOw UddA== X-Gm-Message-State: AOAM53016e6kASEB3RNQZEfN9EAjyVm6sD6WnqvCbSLZ0pO3aCQPwt8C 2rVv8ekz/+9zcCe4fk4mv+4= X-Google-Smtp-Source: ABdhPJw8aSQnJEQ7/CjsxrYYRV7UzSf6QsWEJkbtyMTqolRr3ZfrxTZkwi3xXjCUfAlDljfu257WRg== X-Received: by 2002:a63:4a18:: with SMTP id x24mr10625788pga.303.1625410886609; Sun, 04 Jul 2021 08:01:26 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id h9sm1571518pgi.43.2021.07.04.08.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 08:01:26 -0700 (PDT) From: Bin Meng To: Anup Patel , opensbi@lists.infradead.org Cc: Bin Meng Subject: [PATCH] platform: generic: Terminate platform.name with null Date: Sun, 4 Jul 2021 23:01:13 +0800 Message-Id: <20210704150113.21531-1-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210704_080130_999794_8C59E734 X-CRM114-Status: UNSURE ( 8.24 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: fw_platform_init() fills platform.name without considering the ending null character. Fix it. Signed-off-by: Bin Meng --- platform/generic/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:533 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org fw_platform_init() fills platform.name without considering the ending null character. Fix it. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- platform/generic/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/generic/platform.c b/platform/generic/platform.c index da0c1af..79d5230 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -85,7 +85,7 @@ unsigned long fw_platform_init(unsigned long arg0, unsigned long arg1, model = fdt_getprop(fdt, root_offset, "model", &len); if (model) - sbi_strncpy(platform.name, model, sizeof(platform.name)); + sbi_strncpy(platform.name, model, sizeof(platform.name) - 1); if (generic_plat && generic_plat->features) platform.features = generic_plat->features(generic_plat_match);