yaml: do not copy '\r' or '\n' into attribute name
This commit is contained in:
@@ -148,7 +148,7 @@ YamlParser::parse(const char* buffer, unsigned int size)
|
|||||||
state = ps_AttrSP;
|
state = ps_AttrSP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*c != ':')
|
if ((*c != ':') && (*c != '\r') && (*c != '\n'))
|
||||||
CONCAT_STR(scratch_buf, scratch_len, *c);
|
CONCAT_STR(scratch_buf, scratch_len, *c);
|
||||||
// trap
|
// trap
|
||||||
case ps_AttrSP:
|
case ps_AttrSP:
|
||||||
|
|||||||
Reference in New Issue
Block a user