Commit 65717d67 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

reg: Null terminate hex-formatted REG_SZ data if necessary.

parent 829c0ced
......@@ -409,7 +409,8 @@ static void free_parser_data(struct parser *parser)
static void prepare_hex_string_data(struct parser *parser)
{
if (parser->data_type == REG_EXPAND_SZ || parser->data_type == REG_MULTI_SZ)
if (parser->data_type == REG_EXPAND_SZ || parser->data_type == REG_MULTI_SZ ||
parser->data_type == REG_SZ)
{
if (parser->is_unicode)
{
......
......@@ -4668,7 +4668,7 @@ static void test_export(void)
err = RegQueryValueExA(hkey, "Wine4d", NULL, &type, (BYTE *)&buffer, &size);
ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err);
ok(type == REG_SZ, "got wrong type %u, expected %u\n", type, REG_SZ);
todo_wine ok(size == 5 || broken(size == 4) /* WinXP */, "got wrong size %u, expected 5\n", size);
ok(size == 5 || broken(size == 4) /* WinXP */, "got wrong size %u, expected 5\n", size);
ok(memcmp(buffer, "\0abc", size) == 0, "got wrong data\n");
dword = 0x100;
verify_reg(hkey, "Wine4e", REG_DWORD, &dword, sizeof(dword), 0);
......
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