]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix strange assertion
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 29 May 2020 11:39:45 +0000 (12:39 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 29 May 2020 11:39:45 +0000 (12:39 +0100)
src/libserver/rspamd_symcache.c

index f452c13444a0e45aa932fba6d81896dd80531812..0bd68fca63640f43e0fbdf3cddbddcef9c73eb32 100644 (file)
@@ -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;