winpr/file: add missing NULL check
ValidFileNameComponent() has been missing a NULL check for its argument.
It's pretty obvious that NULL is not a valid file name component.
@@ -824,6 +824,9 @@ BOOL ValidFileNameComponent(LPCWSTR lpFileName)
{
LPCWSTR c = NULL;
+ if (!lpFileName)
+ return FALSE;
+
/* CON */
if ((lpFileName[0] != L'\0' && (lpFileName[0] == L'C' || lpFileName[0] == L'c')) &&
(lpFileName[1] != L'\0' && (lpFileName[1] == L'O' || lpFileName[1] == L'o')) &&
