mirror of
https://github.com/esphome/esphome.git
synced 2026-10-01 00:40:21 +00:00
[api] Fix heap-buffer-overflow in protobuf message dump for StringRef (#14721)
This commit is contained in:
@@ -13,7 +13,7 @@ namespace esphome::api {
|
||||
static inline void append_quoted_string(DumpBuffer &out, const StringRef &ref) {
|
||||
out.append("'");
|
||||
if (!ref.empty()) {
|
||||
out.append(ref.c_str());
|
||||
out.append(ref.c_str(), ref.size());
|
||||
}
|
||||
out.append("'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user