Commit b8b7979f authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Stop parsing REG_SZ values containing NUL character sequences.

parent 87717c9c
...@@ -402,8 +402,7 @@ static BOOL REGPROC_unescape_string(WCHAR *str, WCHAR **unparsed) ...@@ -402,8 +402,7 @@ static BOOL REGPROC_unescape_string(WCHAR *str, WCHAR **unparsed)
str[val_idx] = '\r'; str[val_idx] = '\r';
break; break;
case '0': case '0':
str[val_idx] = '\0'; return FALSE;
break;
case '\\': case '\\':
case '"': case '"':
str[val_idx] = str[str_idx]; str[val_idx] = str[str_idx];
......
...@@ -1694,12 +1694,12 @@ static void test_invalid_import(void) ...@@ -1694,12 +1694,12 @@ static void test_invalid_import(void)
"\"Wine33d\"=\"Value2\\0\\0\\0\\0\"\n" "\"Wine33d\"=\"Value2\\0\\0\\0\\0\"\n"
"\"Wine33e\"=\"Value3\\0Value4\"\n" "\"Wine33e\"=\"Value3\\0Value4\"\n"
"\"Wine33f\"=\"\\0Value5\"\n\n"); "\"Wine33f\"=\"\\0Value5\"\n\n");
todo_wine verify_reg_nonexist(hkey, "Wine33a"); verify_reg_nonexist(hkey, "Wine33a");
todo_wine verify_reg_nonexist(hkey, "Wine33b"); verify_reg_nonexist(hkey, "Wine33b");
todo_wine verify_reg_nonexist(hkey, "Wine33c"); verify_reg_nonexist(hkey, "Wine33c");
todo_wine verify_reg_nonexist(hkey, "Wine33d"); verify_reg_nonexist(hkey, "Wine33d");
todo_wine verify_reg_nonexist(hkey, "Wine33e"); verify_reg_nonexist(hkey, "Wine33e");
todo_wine verify_reg_nonexist(hkey, "Wine33f"); verify_reg_nonexist(hkey, "Wine33f");
close_key(hkey); close_key(hkey);
...@@ -2205,12 +2205,12 @@ static void test_invalid_import_unicode(void) ...@@ -2205,12 +2205,12 @@ static void test_invalid_import_unicode(void)
"\"Wine33d\"=\"Value2\\0\\0\\0\\0\"\n" "\"Wine33d\"=\"Value2\\0\\0\\0\\0\"\n"
"\"Wine33e\"=\"Value3\\0Value4\"\n" "\"Wine33e\"=\"Value3\\0Value4\"\n"
"\"Wine33f\"=\"\\0Value5\"\n\n"); "\"Wine33f\"=\"\\0Value5\"\n\n");
todo_wine verify_reg_nonexist(hkey, "Wine33a"); verify_reg_nonexist(hkey, "Wine33a");
todo_wine verify_reg_nonexist(hkey, "Wine33b"); verify_reg_nonexist(hkey, "Wine33b");
todo_wine verify_reg_nonexist(hkey, "Wine33c"); verify_reg_nonexist(hkey, "Wine33c");
todo_wine verify_reg_nonexist(hkey, "Wine33d"); verify_reg_nonexist(hkey, "Wine33d");
todo_wine verify_reg_nonexist(hkey, "Wine33e"); verify_reg_nonexist(hkey, "Wine33e");
todo_wine verify_reg_nonexist(hkey, "Wine33f"); verify_reg_nonexist(hkey, "Wine33f");
close_key(hkey); close_key(hkey);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment