Add magic value
This commit is contained in:
@@ -57,10 +57,10 @@ void logPrintf(const char* level, const char* origin, const char* format, ...);
|
||||
|
||||
std::string getLastLogs();
|
||||
void clearLastLogs();
|
||||
// Clamps logHead into range. Returns true if logHead was out of range (repaired),
|
||||
// which also means logMessages is untrusted garbage. Callers should call
|
||||
// clearLastLogs() when this returns true so getLastLogs() does not dump corrupt
|
||||
// data into crash reports.
|
||||
// Validates the RTC log state (magic word + logHead range). Returns true if
|
||||
// corruption was detected (magic mismatch or logHead out of range), meaning
|
||||
// logMessages is untrusted garbage. Callers should call clearLastLogs() when
|
||||
// this returns true so getLastLogs() does not dump corrupt data into crash reports.
|
||||
bool sanitizeLogHead();
|
||||
|
||||
class MySerialImpl : public Print {
|
||||
|
||||
Reference in New Issue
Block a user