mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 16:08:10 +01:00
bounding buffer copy
This commit is contained in:
parent
28bb6f5507
commit
b0c5b1ddbb
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue