commit | ef700aac6985098dc23f630d0158aa8b98b43650 | [log] [tgz] |
---|---|---|
author | Mark Salyzyn <salyzyn@google.com> | Wed Mar 18 23:44:20 2015 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Mar 18 23:44:21 2015 +0000 |
tree | b1fda33e613fa078443e7e62331649a3c9857a9f | |
parent | 8cb7853a7377e18c2654b67bcc383a404161e55c [diff] | |
parent | dfae2786d9066197a36bd15f151e3a52f4f1ab57 [diff] |
Merge "liblog: reject empty logging messages"
diff --git a/liblog/logd_write.c b/liblog/logd_write.c index a865093..8f8cc3f 100644 --- a/liblog/logd_write.c +++ b/liblog/logd_write.c
@@ -178,6 +178,10 @@ static pid_t last_pid = (pid_t) -1; static atomic_int_fast32_t dropped; + if (!nr) { + return -EINVAL; + } + if (last_uid == AID_ROOT) { /* have we called to get the UID yet? */ last_uid = getuid(); }