Files
nixos-config/modules/system/ntfsplus-patches/0002-gate-bad-character-check-by-windows_names.patch
T

33 lines
812 B
Diff

From 7fbf82056e26d99bfa4d5aab87ce287cd8c8cbef Mon Sep 17 00:00:00 2001
From: Lumpiasty <arek.dzski@gmail.com>
Date: Thu, 7 May 2026 01:56:33 +0200
Subject: [PATCH 2/2] gate bad character check by windows_names
---
namei.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/namei.c b/namei.c
index 9e937d1..7369943 100644
--- a/namei.c
+++ b/namei.c
@@ -61,12 +61,12 @@ static int ntfs_check_bad_windows_name(struct ntfs_volume *vol,
const __le16 *wc,
unsigned int wc_len)
{
- if (ntfs_check_bad_char(wc, wc_len))
- return -EINVAL;
-
if (!NVolCheckWindowsNames(vol))
return 0;
+ if (ntfs_check_bad_char(wc, wc_len))
+ return -EINVAL;
+
/* Check for trailing space or dot. */
if (wc_len > 0 &&
(wc[wc_len - 1] == cpu_to_le16(' ') ||
--
2.53.0