-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
I was on holiday when you sent these patches, sorry for the late review.
Am 2014-12-13 um 18:06 schrieb Jonathan Vollebregt:
+static LSTATUS sane_path(const WCHAR *key) +{
- if (key[0] == '\' && key[1] == '\' && key[2] != '\')
return ERROR_NO_REMOTE;
- return ERROR_SUCCESS;
+}
This adds (or rather extends) a possible out of bound array access.
Otherwise these patches look reasonable to me and worth review by others.
A general note on the error handling code for other reviewers: Native reg.exe has very limited error reporting. With a few exceptions it just prints a generic message like "ERROR: INVALID SYNTAX" or something similar.
I guess there are also some possible improvements on the output code as Bruno mentioned, but I think patch 3 is OK until (if ever) we have unified console output handling for all command line programs.