[RTL]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 25 Sep 2016 08:25:45 +0000 (08:25 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 25 Sep 2016 08:25:45 +0000 (08:25 +0000)
- Avoid dereferencing a NULL pointer in RtlIsTextUnicode
CORE-12027 #resolve

svn path=/trunk/; revision=72797

reactos/sdk/lib/rtl/unicode.c

index a12e956..a6185b9 100644 (file)
@@ -1367,7 +1367,7 @@ RtlIsTextUnicode(CONST VOID* buf, INT len, INT* pf)
             else
                 weight = 1;
 
             else
                 weight = 1;
 
-            if (*pf && (*pf & IS_TEXT_UNICODE_DBCS_LEADBYTE))
+            if (flags & IS_TEXT_UNICODE_DBCS_LEADBYTE)
                 out_flags |= IS_TEXT_UNICODE_DBCS_LEADBYTE;
         }
     }
                 out_flags |= IS_TEXT_UNICODE_DBCS_LEADBYTE;
         }
     }