Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1153920pxb; Thu, 24 Mar 2022 13:55:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygxKIhx4qf/yG3viOBDhN6Un9YsQ4iugg0hNrJqJU0W2qoJGZylvwKddqzQuD5FfRwZcF3 X-Received: by 2002:a17:903:190:b0:154:9ee:cd25 with SMTP id z16-20020a170903019000b0015409eecd25mr7908057plg.102.1648155318415; Thu, 24 Mar 2022 13:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648155318; cv=none; d=google.com; s=arc-20160816; b=A8/uLe8FR3raaLCX80YUSaFHNt/EFl7S7VdvueFWGae1UtD867orhk2ZeIP2et9xch izl78rX5hx5l2kq2cF35B+hbzLQwQZd9+hJ2dlWOiG/0L9RcpnE2GFpNjtM2KCu/oBkF iLQ16xd6kQZtdolGJUr+W9tT++dtXwDCi0MmX50gz2VW0BFNo8od4cjsKYW4j9CVTlVT fd9lVXFnNlHGEZG0ZlMLi84bczh1J3CeS1SB2ZxINTt+MeoTaIp1lS1TPBchV3rOztMh SdBPg571M/IZt55Yus+7zONpFYn8K1QQs+jBxQi5cfAXRUu4EiNQCCVe+c3YcrZma2X3 DXkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=J5xZRXBRZpPf9DFjLpJ/mgaWulDkzYyQLtAX+bQIKYQ=; b=hw5+kgbRSwNHVRcUHLixECVOsWMBJ+h2JRZV5HNJM5hrRNd9gpeaQ9JooXoPu+jXME Zraj9Je7iRUgWsu9ewBSxcVoIrVwiyJ7IQlll9XdBSwLI0GVKxcqeQaNP/wyV4B4wZbl wuyU4cyZuJeTDfpMN+MlsbGbAbbNLguGYxsQXNWnonLRd/4xsYSR+mEOIjAPmXhzIQyn Dv5mfwne/RsPwQEXtuwcbTSMwSSiaTlgfQa4etQd6Sn1EweaH0RGMfYwaWUZNDYFVzmW te2CjqidWNPaAAu++t6dlFV20P85JFprgdDskdmBqguWQgu8QGxaryBDL+UlApCFgHOe +ogw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a170902b94800b001549a184a7dsi312242pls.513.2022.03.24.13.55.01; Thu, 24 Mar 2022 13:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232243AbiCXGea (ORCPT + 99 others); Thu, 24 Mar 2022 02:34:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiCXGe3 (ORCPT ); Thu, 24 Mar 2022 02:34:29 -0400 Received: from mail.meizu.com (edge05.meizu.com [157.122.146.251]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CB53972C5; Wed, 23 Mar 2022 23:32:57 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail12.meizu.com (172.16.1.108) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 24 Mar 2022 14:32:49 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Thu, 24 Mar 2022 14:32:47 +0800 From: Haowen Bai To: , , , , , CC: , , , Haowen Bai Subject: [PATCH] SUNRPC: Increase size of servername string Date: Thu, 24 Mar 2022 14:32:46 +0800 Message-ID: <1648103566-15528-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-125.meizu.com (172.16.1.125) To IT-EXMB-1-125.meizu.com (172.16.1.125) X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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-nfs@vger.kernel.org This patch will fix the warning from smatch: net/sunrpc/clnt.c:562 rpc_create() error: snprintf() chops off the last chars of 'sun->sun_path': 108 vs 48 Signed-off-by: Haowen Bai --- net/sunrpc/clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index c83fe61..6e0209e 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -526,7 +526,7 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) .servername = args->servername, .bc_xprt = args->bc_xprt, }; - char servername[48]; + char servername[108]; struct rpc_clnt *clnt; int i; -- 2.7.4