diff --git a/liblog/logger_write.c b/liblog/logger_write.c index 43241254f..2599a5394 100644 --- a/liblog/logger_write.c +++ b/liblog/logger_write.c @@ -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; }