[APPHELP] Fix a possible read past the buffer in SdbpIsPathOnRemovableMedia.
authorMark Jansen <mark.jansen@reactos.org>
Sat, 4 Mar 2017 20:29:46 +0000 (20:29 +0000)
committerMark Jansen <mark.jansen@reactos.org>
Sat, 4 Mar 2017 20:29:46 +0000 (20:29 +0000)
svn path=/trunk/; revision=74062

reactos/dll/appcompat/apphelp/layer.c

index ab15b2f..afe1ca3 100644 (file)
@@ -109,7 +109,7 @@ BOOL SdbpIsPathOnRemovableMedia(PCWSTR Path)
 {
     WCHAR tmp[] = { 'A',':','\\',0 };
     ULONG type;
-    if (!Path)
+    if (!Path || Path[0] == UNICODE_NULL)
     {
         SHIM_ERR("Invalid argument\n");
         return FALSE;