Skip to content

Commit

Permalink
add TODO on possible memory out-of-bounds error
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 23, 2023
1 parent 41228e8 commit 917e268
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/devices/thermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,8 @@ void Thermostat::process_RC35wwTimer(std::shared_ptr<const Telegram> telegram) {
if (telegram->type_id != 0x38) {
return;
}

// TODO: should this be >= 87 to avoid out of bounds?
if (telegram->message_length + telegram->offset >= 92 && telegram->offset <= 87) {
char data[sizeof(wwVacation_)];
snprintf(data,
Expand Down

0 comments on commit 917e268

Please sign in to comment.