Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp856684imi; Thu, 21 Jul 2022 12:19:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vvW28Nwq3OUQAHudL62C45LXO6ELTR4SHeP8YGPNbxvxZPChkSPtqwji2onUbBxwHUEjsX X-Received: by 2002:a17:907:2e0b:b0:72b:8720:487e with SMTP id ig11-20020a1709072e0b00b0072b8720487emr79503ejc.102.1658431180041; Thu, 21 Jul 2022 12:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658431180; cv=none; d=google.com; s=arc-20160816; b=lfYOpljXqApHQq5/imV5rAWrSDH4M+KlltELL6hPy/nTRCPuG2lJ/lDA/L9esm6xIr 3P2dG1nKLCxcvvtSM+cxuXGqcgJ/VI681XMDCcY+NAkXdvU9vGC2zjamLh+cQJ/Gf2Fy vkq04Co7OHI4RHre+nObcW3hI8QkRM30Id+Y6eJK8h4kJpCOiSW7iqorxZU/D5q49bj5 pw3NpR0h9nbu5GHAD5hv8Jp/ycssxWSz24ZNTvAqlADkW8yJx9PSAX/5XGQnsU+JE7cv Wz1iIcyvPG4NVSOMRThazS3HuwSdy22q/BxasICGOa1qrOmBxZJIo9QGUg+SiCloKaLr RDJw== 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 :message-id:date:subject:to:from:dkim-signature; bh=pFC7DBUzRNxjy2P8VuhVKf+CK1KK7WgBOXSnSXjnCMc=; b=h3O8MG2RyUirhkWIC21OP1smUPBZwv4wOxgtPxCAbjWyoBiWT4SDKT2Jn+eT6sixGI 0KRo0FOK0ozvtp1HZfQiLYO1IaO9qCcD5jaVrHGB/uVCCzMbTNEajPK4e+Jbc/0nJIn1 GTKyg3cgPCZqQOJWhbox6gcLXUHGxMlAGdqxvRSWwPhKgVwAr6CxnKCYZgKXG8JTh0Rv zcXRQDO+J9EkNBHQUJ1H7SHEwcX+lv3GMVnJQYFPSxyLGKMBLU7GCspfr7QdVg9PdtKb qaKM6KUnWD63InPAlFNd730IW2RnRSEa3T/9RSkB/BHtp4WUKEPr8utGKvaYlB47Gaq8 0SRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B8WgV9fz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa37-20020a17090786a500b0072f25c0af5dsi3602128ejc.135.2022.07.21.12.19.06; Thu, 21 Jul 2022 12:19:40 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B8WgV9fz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbiGUTS2 (ORCPT + 99 others); Thu, 21 Jul 2022 15:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiGUTS2 (ORCPT ); Thu, 21 Jul 2022 15:18:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D6EDB257 for ; Thu, 21 Jul 2022 12:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658431105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=pFC7DBUzRNxjy2P8VuhVKf+CK1KK7WgBOXSnSXjnCMc=; b=B8WgV9fz0/xzDkGbDgnh3OtN9bPp3CfLPXH8wGLOtluxSvPvSJMc6dAo0kIX2ddVyzNgno rCdc0VgaHHeI06174m3ZYhZpELt4dyF9uwsh9dNZ9aYkhscB2L14Qxo1veQ05nnoqclcyi 5yyrBQOhMouX8r+jLQip5RYdR1bI6+M= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-284-6NZiQbwnO1SE2J-syANpeA-1; Thu, 21 Jul 2022 15:18:18 -0400 X-MC-Unique: 6NZiQbwnO1SE2J-syANpeA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 03CFD185A7B2 for ; Thu, 21 Jul 2022 19:18:18 +0000 (UTC) Received: from dobby.home.dicksonnet.net (unknown [10.22.8.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA7A52166B2A for ; Thu, 21 Jul 2022 19:18:16 +0000 (UTC) From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH] rpc-pipefs-generator: allocate enough space for pipefs-directory buffer Date: Thu, 21 Jul 2022 15:18:12 -0400 Message-Id: <20220721191812.60294-1-steved@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE 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-nfs@vger.kernel.org Commit 7f8463fe fixed a warning but introduce a regression by not allocating enough space for the pipefs-directory buffer when it is not the default. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2106896 Signed-off-by: Steve Dickson --- systemd/rpc-pipefs-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/rpc-pipefs-generator.c b/systemd/rpc-pipefs-generator.c index 7b2bb4f7..3aaeaeaf 100644 --- a/systemd/rpc-pipefs-generator.c +++ b/systemd/rpc-pipefs-generator.c @@ -28,7 +28,7 @@ static int generate_mount_unit(const char *pipefs_path, const char *pipefs_unit, { char *path; FILE *f; - size_t size = (strlen(dirname) + 1 + strlen(pipefs_unit)); + size_t size = (strlen(dirname) + 1 + strlen(pipefs_unit) + 1); path = malloc(size); if (!path) -- 2.36.1