Commit 84ec4b0d authored by longpanda's avatar longpanda
Browse files

Support escaped quotes (\") in ventoy.json. (#1062)

parent 9615e7ea
......@@ -152,6 +152,23 @@ static int vtoy_json_parse_string
return JSON_FAILED;
}
if (*(pcPos - 1) == '\\')
{
for (pcPos++; *pcPos; pcPos++)
{
if (*pcPos == '"' && *(pcPos - 1) != '\\')
{
break;
}
}
if (*pcPos == 0 || pcPos < pcTmp)
{
json_debug("Invalid quotes string %s.", pcData);
return JSON_FAILED;
}
}
*ppcEnd = pcPos + 1;
uiLen = (grub_uint32_t)(unsigned long)(pcPos - pcTmp);
......
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