mirror of
https://github.com/esphome/esphome.git
synced 2026-10-03 01:35:59 +00:00
[zwave_proxy] Fix uint8_t overflow for buffer index and frame end (#14480)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b6d7e8e14d
commit
c8e7f78a25
@@ -281,6 +281,10 @@ bool ZWaveProxy::parse_byte_(uint8_t byte) {
|
||||
break;
|
||||
}
|
||||
case ZWAVE_PARSING_STATE_READ_BL_MENU:
|
||||
if (this->buffer_index_ >= this->buffer_.size()) {
|
||||
this->parsing_state_ = ZWAVE_PARSING_STATE_WAIT_START;
|
||||
break;
|
||||
}
|
||||
this->buffer_[this->buffer_index_++] = byte;
|
||||
if (!byte) {
|
||||
this->parsing_state_ = ZWAVE_PARSING_STATE_WAIT_START;
|
||||
|
||||
Reference in New Issue
Block a user