Problem
In state_machine.cpp:210-227, if loading zones from NVS partially fails (e.g., latitude loads but longitude fails), the zone is used anyway with corrupted coordinates. The any_read_ok flag is per-field, not per-zone, so partial zone data can be used.
Location
firmware/main/state_machine.cpp:210-227
Severity
HIGH - Geofence breach detection using corrupted coordinates
Suggested Fix
Add per-zone validation - if any field of a zone fails to load, mark that zone invalid or skip it entirely.
Problem
In
state_machine.cpp:210-227, if loading zones from NVS partially fails (e.g., latitude loads but longitude fails), the zone is used anyway with corrupted coordinates. Theany_read_okflag is per-field, not per-zone, so partial zone data can be used.Location
firmware/main/state_machine.cpp:210-227Severity
HIGH - Geofence breach detection using corrupted coordinates
Suggested Fix
Add per-zone validation - if any field of a zone fails to load, mark that zone invalid or skip it entirely.