aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-05-29 12:39:45 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-05-29 12:39:45 +0100
commit23c32545f5853aac316fe9c28ec08d6b70231d3e (patch)
treee5f382a080681b8034acf825a38fa21cb0b8f9a4 /src
parentb2ae647a81fa71578330adca0ea9e52a3f78d05a (diff)
downloadrspamd-23c32545f5853aac316fe9c28ec08d6b70231d3e.tar.gz
rspamd-23c32545f5853aac316fe9c28ec08d6b70231d3e.zip
[Minor] Fix strange assertion
Diffstat (limited to 'src')
-rw-r--r--src/libserver/rspamd_symcache.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c
index f452c1344..0bd68fca6 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;