[PATCH v3 04/10] reg: Add sane_path function to do preliniary key validation
Hugh McMaster
hugh.mcmaster at outlook.com
Mon Nov 10 05:18:25 CST 2014
On Saturday, 8 Nov 2014 11:26:45 +0100, Jonathan Vollebregt wrote:
>+static LSTATUS sane_path(const WCHAR *key)
>+{
>+ if (key[0] == '\\' && key[1] == '\\' && key[2] != '\\')
>+ return ERROR_NO_REMOTE;
>+
>+ return ERROR_SUCCESS;
>+}Where are you handling (invalid) keys beginning with backslashes, e.g.: \\HKEY_CURRENT_USER\\Console? Windows only allows two consecutive backslashes at the beginning of a key.
>+ if (key[0] == '\\' && key[1] == '\\' && key[2] != '\\')
HKEY... --> ERROR_SUCCESS
\HKEY... --> ERROR_SUCCESS !!!
\\HKEY... --> ERROR_NO_REMOTE
\\\HKEY... --> ERROR_SUCCESS !!!
Those two marked with !!! need to be handled. Do you do this in a later patch?
--
Hugh McMaster
More information about the wine-devel
mailing list