mirror of
https://github.com/esphome/esphome.git
synced 2025-02-08 14:10:54 +00:00
bounding buffer copy
This commit is contained in:
parent
28bb6f5507
commit
b0c5b1ddbb
@ -291,7 +291,7 @@ void LD2415HComponent::parse_firmware_() {
|
||||
++fw;
|
||||
|
||||
// Copy string into firmware
|
||||
std::strcpy(this->firmware_, fw);
|
||||
std::strncpy(this->firmware_, fw, sizeof(this->firmware_));
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Firmware value invalid.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user