am 4423df76: Merge "logcat: add sanity check"
* commit '4423df76f589e9fbd566f368c453758451c82f78': logcat: add sanity check
This commit is contained in:
commit
942cfefc61
|
@ -296,6 +296,11 @@ static void readLogLines(log_device_t* devices)
|
|||
fprintf(stderr, "read: Unexpected EOF!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else if (entry->entry.len != ret - sizeof(struct logger_entry)) {
|
||||
fprintf(stderr, "read: unexpected length. Expected %d, got %d\n",
|
||||
entry->entry.len, ret - sizeof(struct logger_entry));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
entry->entry.msg[entry->entry.len] = '\0';
|
||||
|
||||
|
|
Loading…
Reference in New Issue