From: Vsevolod Stakhov Date: Fri, 29 May 2020 11:39:45 +0000 (+0100) Subject: [Minor] Fix strange assertion X-Git-Tag: 2.6~377 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23c32545f5853aac316fe9c28ec08d6b70231d3e;p=thirdparty%2Frspamd.git [Minor] Fix strange assertion --- diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index f452c13444..0bd68fca63 100644 --- a/src/libserver/rspamd_symcache.c +++ b/src/libserver/rspamd_symcache.c @@ -3500,13 +3500,10 @@ rspamd_symcache_get_allowed_settings_ids (struct rspamd_symcache *cache, return item->allowed_ids.dyn.n; } else { - while (item->allowed_ids.st[cnt] != 0) { + while (item->allowed_ids.st[cnt] != 0 && cnt < G_N_ELEMENTS (item->allowed_ids.st)) { cnt ++; - - g_assert (cnt < G_N_ELEMENTS (item->allowed_ids.st)); } - *nids = cnt; return item->allowed_ids.st;