From nobody Tue Sep 29 08:25:34 2026 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBE853D565E for ; Mon, 10 Aug 2026 12:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786364360; cv=none; b=i2avUmft/kxYj4h/gHMWgAlA4v/dbQgwY1WPdCTO1H9w6qTSjAFs0xaiUZxO6gBhRvqGjisrYVYrN/a7BHKms5w5R5DmOhqSqvz29OHO594NF+15n4cVoL9Tr2Xxyt9ER3oneFRUSPIyxhZuC9y6WtyiWKUYgJUMLzdgaPuZCuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786364360; c=relaxed/simple; bh=2PsvimWgoyGw4StDRSRVThkKzmIspBGR2qLe4BWt8vA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EMozXp/GyhKoNwQD2gpEewDWFuO8bSu7Bz3TIAy89v5w39fd52173q7RgCopcAhNs9QFA9Z9QR8RAeVByZQx2r8ZQWs1ejkJ5Gbbvx35MGhABDZxIEAtNb6gh7F1KG0dXYxgi8qmupHHWvTu6u0Wdrk71o14YVDHHd+2O+Hyqa4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RqG+xHDl; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RqG+xHDl" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-84eb992a881so1176471b3a.2 for ; Mon, 10 Aug 2026 05:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786364359; x=1786969159; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=N5+dxmrF42+92BXej+kvrBe+Oy4NpEKJDlFbxvsp1bc=; b=RqG+xHDlTsGOVPYay/BjshjYjgay5upqV1rugUVVx6U793LCpGOAoGwqJ+In3EzfNZ zZOketq7n7YNrm0Zu4bxHo/WSs0a39JC7d3HPFPNqSPvnOqnor94Xw84PNOKjk5fsO3W cQYDCfa5kuEiGuHnkGuTg5ba/7dzypPkiiUDBAbF13+3GZBHOf/RNOm37PiVu8CDpJgj Ofz04o5751Eppy/jcRgy8ZHnNQ4bzxVvW4f6zHo88yFAx9/jzy1MXdTTmQEc90RzZ+hR GoGzDBJpE9ny+sfUzg1oV/dYkp00C4gf+FpkyuhSG7/Kqtwfp501aPb2QuPytTNgwviO S48Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786364359; x=1786969159; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=N5+dxmrF42+92BXej+kvrBe+Oy4NpEKJDlFbxvsp1bc=; b=BJxxoZyIx8DuvlX2vcw6e6MzomfKI3QW11PDkdA6vII6Mrh2H/g07MdgjYkbHbd9uo nUEZAfgnp6sI6/yAT0tU1KfGcOBCwHO20AlaphOAxiuytHxmoi8+Dm8StXASI61pOys6 +Azfh5mSwSxrwKeVC4ex1NvUsD0lNzNosB2mv1AbmfQ2j3MAT6zd10hQgbw/gLW0fFzc HeWhXcR/vzWGEN0OF0D2X6hwHESzs/cpLeFBPsCHbWiDw/krs1f5f6htbRCb0Jb/dpqJ t0TlPWSj3dKLFO3n2FqqSooZWmlBjRsbTcohB6Q0K2Y7lcptXEltgLzVbXekxG+nvbpp BXww== X-Forwarded-Encrypted: i=1; AHgh+Rpmfl/b40Yr3glpYXwZkuKc+7KdwMWNfWuJZ7pejLKasUMSQoL/LJN+eh9VtlGOTqVCTWZOHlUxVMBNqSs=@vger.kernel.org X-Gm-Message-State: AOJu0YyUuryiPqjg6NLjptPOE3URVhmwBl7vn3vyiUGLGWvGDtfnELCj 18D2rOeIrVppvJt/xoMVgRVzvbV3rTj7op4u7BFGg8rCcHS/Bbk8uWqX X-Gm-Gg: AR+sD13xmakaWGp8pBHiYvYvBdSMZmxCb+JjXnE8MDB58y8OMsa+PJsyv/7pQDBwusZ BSJnd45F5y5H1bwNZZdxvFfqVf6L2/OhP4kia6z02HFWwl1O1OjRvOOm7YIVBgX8a5o0QkkD1XX tzm122yRAtVCCLqIzPBAhWbhlTtrY9wDFRqiuEmkvsZJDP5NPBRg7MAqLMIJDdmdn0pvUfUNkWL J0z2KFJ5/ynxUhrlRpQmDTeYaBN0d5abrqy1tQuYcuRsauNIgRMsgBe+QyyNVtFg9jELi+PQEaG KX7psjrh8h/IGKmhuGx1SFcn2nRbHd5CUuAvKXYsrK5+GCDi9Qdel514Av0fy5uXJePedturObm tk+/BDbaSQHhnLhlUdW6B3EGBrTZ+NVYAHSreBVPoon0UGxvFk3I94Zx5swtfHmhFCX+XZj2uDi G7UWbUYK8TdO2RoioyGXuhmppy6iEOgWHYX/ushZzemkxJD3JZnHeKBIdV5Yl3v94u7hnkI+8Ha Es= X-Received: by 2002:a05:6a00:3cc5:b0:847:8dec:1427 with SMTP id d2e1a72fcca58-84f4fd9f647mr31055016b3a.8.1786364359090; Mon, 10 Aug 2026 05:19:19 -0700 (PDT) Received: from ubuntu.. ([49.205.39.116]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-84f5a3a18a5sm3800788b3a.8.2026.08.10.05.19.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 05:19:18 -0700 (PDT) From: Ajith P V To: FlorianSchandinat@gmx.de, deller@gmx.de Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ajith P V Subject: [PATCH] video: fbdev: via: refactor deprecated strcpy Date: Mon, 10 Aug 2026 12:19:08 +0000 Message-ID: <20260810121908.31307-1-ajithpv.linux@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace the deprecated and unbounded strcpy() function with the safer strscpy() alternative when setting up the framebuffer fixed screen information [1][2]. The destination buffer `fix->id` is a fixed-size character array of 16 bytes. The source `viafb_name` is currently a static global string literal ("Via"), which safely fits the destination and poses no active overflow risk. However, replacing strcpy() with strscpy() aligns this driver with the ongoing kernel-wide security initiative to eliminate unbounded string copies, hardening the code against future modifications. This is a proactive API cleanup and there is no functional performance or truncation risk since `viafb_name` safely fits inside the 16-byte struct constraints. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy= [1] Link: https://github.com/KSPP/linux/issues/88 [2] Signed-off-by: Ajith P V --- drivers/video/fbdev/via/viafbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/v= iafbdev.c index 80f95dac32c8..925b56830fdd 100644 --- a/drivers/video/fbdev/via/viafbdev.c +++ b/drivers/video/fbdev/via/viafbdev.c @@ -144,7 +144,7 @@ static void viafb_setup_fixinfo(struct fb_fix_screeninf= o *fix, struct viafb_par *viaparinfo) { memset(fix, 0, sizeof(struct fb_fix_screeninfo)); - strcpy(fix->id, viafb_name); + strscpy(fix->id, viafb_name, sizeof(fix->id)); =20 fix->smem_start =3D viaparinfo->fbmem; fix->smem_len =3D viaparinfo->fbmem_free; --=20 2.43.0