Merge "liblog: fix an undefined-behavor in __write_to_log_daemon()"

This commit is contained in:
Treehugger Robot 2017-02-08 17:21:57 +00:00 committed by Gerrit Code Review
commit a3b6d30ba7
1 changed files with 1 additions and 1 deletions

View File

@ -343,7 +343,7 @@ static int __write_to_log_daemon(log_id_t log_id, struct iovec *vec, size_t nr)
}
}
/* tag must be nul terminated */
if (strnlen(tag, len) >= len) {
if (tag && strnlen(tag, len) >= len) {
tag = NULL;
}