yaml: do not copy '\r' or '\n' into attribute name

This commit is contained in:
Raphael Coeffic
2021-11-10 11:06:59 +01:00
parent 985a8760bb
commit 7da2615d4f
+1 -1
View File
@@ -148,7 +148,7 @@ YamlParser::parse(const char* buffer, unsigned int size)
state = ps_AttrSP;
break;
}
if (*c != ':')
if ((*c != ':') && (*c != '\r') && (*c != '\n'))
CONCAT_STR(scratch_buf, scratch_len, *c);
// trap
case ps_AttrSP: