am 71a86444: am 4e0a2523: Merge "liblog: reject empty logging messages"
* commit '71a86444873968fafda87d6ad5855df42c9ea0f0':
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();
}