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

Skip to content
Commit e1ede153 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

liblog: do better checks of log messages.

Testing:

The following test cases all passed and generated log entries:

 # echo -n '\03foo\0bar\0' > /dev/log/main
 # echo -n '\03\0bar\0' > /dev/log/main
 # echo -n '\03\0a\0' > /dev/log/main

The following entries were successfully processed by
logcat but produced no log entries:

 # echo -n '\03\0\0' > /dev/log/main
 # echo -n '\03a\0\0' > /dev/log/main
 # echo -n '\03b\0\0' > /dev/log/main

Also tested the pathological error condition:

 cat /dev/urandom > /dev/log/main

which produced many "+++ LOG: malformed log entry" errors.

Bug: 5478600
Change-Id: I53bc79507242dcfc14445746c29edf47be0a90b4
parent 4423df76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment