mirror of
https://github.com/esphome/esphome.git
synced 2025-09-04 04:12:23 +01:00
Fix check
This commit is contained in:
@@ -182,7 +182,7 @@ void EPaperBase::initialize_() {
|
|||||||
}
|
}
|
||||||
const auto *ptr = sequence + index;
|
const auto *ptr = sequence + index;
|
||||||
const uint8_t length = ptr[1];
|
const uint8_t length = ptr[1];
|
||||||
if (sequence_size - index < length) {
|
if (sequence_size - index < length + 2) {
|
||||||
this->mark_failed("Malformed init sequence");
|
this->mark_failed("Malformed init sequence");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user