[0.4.9][CDFS_NEW][SDK] Replace intermediate workarounds with proper fix CORE-14067
authorJoachim Henze <Joachim.Henze@reactos.org>
Thu, 31 Dec 2020 14:15:43 +0000 (15:15 +0100)
committerJoachim Henze <Joachim.Henze@reactos.org>
Thu, 31 Dec 2020 14:15:43 +0000 (15:15 +0100)
Historically we did hit assertions and exceptions in MS CDFS driver
when special characters 'äöüßÄÖÜ' were used in a valid filesystem.

We did already apply varying workarounds for those issues
into CDFS_NEW for 0.4.8, 0.4.9, 0.4.10
while we were in the learning curve still.

Later we found the root cause to be our faulty XDK
FsRtlIsAnsiCharacter* macros.

By fixing the macros we can replace the varying historic workarounds
and sync to the final 0.4.11-dev master state.

We did not ever observe new issues with any other filesystems that do
also use those macros during the last years. So we can sync now.

drivers/filesystems/cdfs_new/cddata.c
sdk/include/xdk/fsrtlfuncs.h

index c21a528..70af0b1 100755 (executable)
@@ -501,7 +501,7 @@ CdRaiseStatusEx (
         DbgPrint( "CDFS: Contact CDFS.SYS component owner for triage.\n");
         DbgPrint( "CDFS: 'eb %p 0;eb %p 0' to disable this alert.\n", &CdTestRaisedStatus, &CdBreakOnAnyRaise);
 
-        /* NT_ASSERT(FALSE); silenced to avoid CORE-14067 */
+        NT_ASSERT(FALSE);
     }
     
     if (NormalizeStatus)  {
index 9de4ed1..b795f41 100644 (file)
@@ -1606,19 +1606,16 @@ extern const UCHAR * const *FsRtlLegalAnsiCharacterArray;
 #endif
 
 #define FsRtlIsAnsiCharacterWild(C)                                            \
-    FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER)
+    FsRtlTestAnsiCharacter((C), FALSE, FALSE, FSRTL_WILD_CHARACTER)
 
 #define FsRtlIsAnsiCharacterLegalFat(C, WILD)                                  \
-    FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) |         \
-                                        ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+    FsRtlTestAnsiCharacter((C), TRUE, (WILD), FSRTL_FAT_LEGAL)
 
 #define FsRtlIsAnsiCharacterLegalHpfs(C, WILD)                                 \
-    FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) |        \
-                                        ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+    FsRtlTestAnsiCharacter((C), TRUE, (WILD), FSRTL_HPFS_LEGAL)
 
 #define FsRtlIsAnsiCharacterLegalNtfs(C, WILD)                                 \
-    FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) |        \
-                                        ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+    FsRtlTestAnsiCharacter((C), TRUE, (WILD), FSRTL_NTFS_LEGAL)
 
 #define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK)                         \
     FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL)