wbemprox: Strip curly brackets from path strings.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2019-09-10 17:09:08 +02:00 committed by Alexandre Julliard
parent ca455c5376
commit 05cb6543b0
1 changed files with 6 additions and 0 deletions

View File

@ -103,6 +103,12 @@ static WCHAR *get_path( struct parser *parser, const struct string *str )
int len = str->len;
WCHAR *ret;
if (p[0] == '{' && p[len - 1] == '}')
{
p++;
len -= 2;
}
if (!(ret = alloc_mem( parser, (len + 1) * sizeof(WCHAR) ))) return NULL;
memcpy( ret, p, len * sizeof(WCHAR) );
ret[len] = 0;