Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3384253rdh; Mon, 27 Nov 2023 12:51:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdrIEQ4E5IJQ/2Il2mVZq4K/2SmQyhkyEi43B4uD/nvnyqN965riz15noYqpjoeYeEVSj4 X-Received: by 2002:a17:902:e88b:b0:1cf:d404:5e7c with SMTP id w11-20020a170902e88b00b001cfd4045e7cmr4875001plg.42.1701118265642; Mon, 27 Nov 2023 12:51:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701118265; cv=none; d=google.com; s=arc-20160816; b=1K8rupFWmDtwC1XwZzLDHJMSFcSJiB7ZiTSR/rfa7HLw+bgGkf/VcDhQUXGJnhrnGI +j1NIcJeV0EvloDKEq1mSYzoozf+0FyO0obYnDzI+R7ZCY882N55WlBnjsZYcggSfENw 8wmkLHWzSc9KRf6paazdLkfOU2+lYA/S03IGZKj4WS+42yGeeTEYIba3eSlKVZRbuGoP u/RTgn2Eokq6mzOqExM9faNhLH2p719cjgj3lLHylO1hAMyuJVd1KRC6TWhrc3uR1NKM kbJ2Ssw1wZuvf3xkB/8DyMkImxJRAv5TnriADQCftnIvJGPCMxbb6hxbgF9f+Ai5p0mA kaEg== 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:reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wYChciMP/u7b3bVBtF5SUMzfxSiI5SlS5MrqMpbiQK8=; fh=5boLJL7o/4sdFfNuiDU0KBvHWIZhX9xnN8P4xpCZIaM=; b=k8lh2mB1LKqIuec/ql6KYOZK8um+8IKHxAlO7/mwoTdRMJCZUYpgSLUoLb9ieKnkkK qnLOGHFqVobmqQxnBkiW6Mk/St4Z6mJ15uGOXu6i61d0CLr/ZlIwvQo1io3Ayil8UqXm iwntHAGKyDdo7nqg0wbcT1m2uLu/lit+1zLyLXwMxvmje0EAmlgvAqRn7IGrwcQSpHl0 pFWaFfMa635e9U2YFObCMPzZhwhkoxb6I01PgaSSZwQZjQ7zDdZ9WCg4rNGZvcG2Tvmd lnpqLpJkxZDMwuJaB11vab3yHmsWmWTPt4+Dl5XP6ppQjam7YaOn3sGzQUID1Rfd+9xM 7l8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kde.org header.s=users header.b=LwMZNHjP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id x11-20020a1709029a4b00b001cfcc0ca772si3066668plv.123.2023.11.27.12.51.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 12:51:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kde.org header.s=users header.b=LwMZNHjP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BBB9A807DE11; Mon, 27 Nov 2023 12:50:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233356AbjK0UuX (ORCPT + 99 others); Mon, 27 Nov 2023 15:50:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231757AbjK0UuW (ORCPT ); Mon, 27 Nov 2023 15:50:22 -0500 X-Greylist: delayed 488 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 27 Nov 2023 12:50:27 PST Received: from letterbox.kde.org (letterbox.kde.org [46.43.1.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C57FA19D; Mon, 27 Nov 2023 12:50:27 -0800 (PST) Received: from vertex.localdomain (pool-173-49-113-140.phlapa.fios.verizon.net [173.49.113.140]) (Authenticated sender: zack) by letterbox.kde.org (Postfix) with ESMTPSA id 5A23D32F798; Mon, 27 Nov 2023 20:42:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kde.org; s=users; t=1701117736; bh=wYChciMP/u7b3bVBtF5SUMzfxSiI5SlS5MrqMpbiQK8=; h=From:To:Cc:Subject:Date:From; b=LwMZNHjPKu3gQGUs2zBpToliB1ZzYCMuL34W2376Ck6cOVyI7BnjmkZLR8+7sFdJm p0igcbnr2XaZs9e1C0xn9cljMXxomKf5+gzZwVGu+pNPGxTRfTCv2KAt8R+w211UUJ kdtXbq8ylXxg8zp7lP3Cp1Byh9Tv0QsKCG3/QbqrhkC9rGvfGYDUT/EP/yTDHVO4FS hWW6MiNpAMkHLIsnZjdQsmP+dJmUH26o/uR15Vc/Q7uysUC28Yt4N7wR/27GayWwD+ OaibKxWZA/5lrDJrP8/CqkH8Ay85xAw/sIJ3PGDlVMmJSepHXER1DZE98GJwFUqggF 0hjpDJUqqHUVQ== From: Zack Rusin To: linux-kernel@vger.kernel.org Cc: Zack Rusin , Dmitry Torokhov , VMware Graphics Reviewers , Arnd Bergmann , Robert Jarzmik , Raul Rangel , linux-input@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] input/vmmouse: Fix device name copies Date: Mon, 27 Nov 2023 15:42:06 -0500 Message-Id: <20231127204206.3593559-1-zack@kde.org> X-Mailer: git-send-email 2.39.2 Reply-To: Zack Rusin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 12:50:47 -0800 (PST) From: Zack Rusin Make sure vmmouse_data::phys can hold serio::phys (which is 32 bytes) plus an extra string, extend it to 64. Fixes gcc13 warnings: drivers/input/mouse/vmmouse.c: In function ‘vmmouse_init’: drivers/input/mouse/vmmouse.c:455:53: warning: ‘/input1’ directive output may be truncated writing 7 bytes into a region of size between 1 and 32 [-Wformat-truncation=] 455 | snprintf(priv->phys, sizeof(priv->phys), "%s/input1", | ^~~~~~~ drivers/input/mouse/vmmouse.c:455:9: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32 455 | snprintf(priv->phys, sizeof(priv->phys), "%s/input1", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 456 | psmouse->ps2dev.serio->phys); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Zack Rusin Fixes: 8b8be51b4fd3 ("Input: add vmmouse driver") Cc: Dmitry Torokhov Cc: VMware Graphics Reviewers Cc: Arnd Bergmann Cc: Robert Jarzmik Cc: Raul Rangel Cc: linux-input@vger.kernel.org Cc: # v4.1+ --- drivers/input/mouse/vmmouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c index ea9eff7c8099..7248cada4c8c 100644 --- a/drivers/input/mouse/vmmouse.c +++ b/drivers/input/mouse/vmmouse.c @@ -72,7 +72,7 @@ */ struct vmmouse_data { struct input_dev *abs_dev; - char phys[32]; + char phys[64]; char dev_name[128]; }; -- 2.39.2