Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4423df76 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android (Google) Code Review
Browse files

Merge "logcat: add sanity check"

parents 8cdd4c33 46070505
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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';