Merge "liblog: fix an undefined-behavor in __write_to_log_daemon()" am: a3b6d30ba7
am: 68a6676c77
Change-Id: I689a3b632393651eeee6272095b4d1a28633393d
This commit is contained in:
commit
327cd83060
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue