From 7da2615d4fe245e07b82aa4bae88d06010405cdf Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sat, 28 Aug 2021 09:48:42 +0200 Subject: [PATCH] yaml: do not copy '\r' or '\n' into attribute name --- radio/src/storage/yaml/yaml_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/storage/yaml/yaml_parser.cpp b/radio/src/storage/yaml/yaml_parser.cpp index 69794505f..c782f2329 100644 --- a/radio/src/storage/yaml/yaml_parser.cpp +++ b/radio/src/storage/yaml/yaml_parser.cpp @@ -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: