From: Timo Sirainen Date: Mon, 21 Nov 2016 21:43:08 +0000 (+0200) Subject: lib-dict: Add extra NULL-check to make static analyzer happier X-Git-Tag: 2.2.27~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=954b2106c12a3e24c66f8e94d0e945ceae9b7cc4;p=thirdparty%2Fdovecot%2Fcore.git lib-dict: Add extra NULL-check to make static analyzer happier str_array_length() already checked NULL internally though. --- diff --git a/src/lib-dict/dict-client.c b/src/lib-dict/dict-client.c index faf8d9e0f4..24dd7e5195 100644 --- a/src/lib-dict/dict-client.c +++ b/src/lib-dict/dict-client.c @@ -873,7 +873,8 @@ dict_warnings_sec(const struct client_dict_cmd *cmd, int msecs, str_printfa(str, ", async-id reply %u.%03u secs ago", async_reply_msecs/1000, async_reply_msecs%1000); } - if (str_array_length(extra_args) >= 4 && + if (extra_args != NULL && + str_array_length(extra_args) >= 4 && str_to_time(extra_args[0], &tv_start.tv_sec) == 0 && str_to_uint(extra_args[1], &tv_start_usec) == 0 && str_to_time(extra_args[2], &tv_end.tv_sec) == 0 &&