commit 23c3254: [Minor] Fix strange assertion
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri May 29 14:49:06 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-05-29 12:39:45 +0100
URL: https://github.com/rspamd/rspamd/commit/23c32545f5853aac316fe9c28ec08d6b70231d3e
[Minor] Fix strange assertion
---
src/libserver/rspamd_symcache.c | 5 +----
1 file changed, 1 insertion(+), 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;
More information about the Commits
mailing list