aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/client/rspamc.c2
-rw-r--r--src/libserver/cfg_rcl.c2
-rw-r--r--src/plugins/regexp.c10
3 files changed, 8 insertions, 6 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c
index 95f04eb5e..f114997cf 100644
--- a/src/client/rspamc.c
+++ b/src/client/rspamc.c
@@ -447,7 +447,7 @@ rspamc_metric_output (const ucl_object_t *obj)
{
ucl_object_iter_t it = NULL;
const ucl_object_t *cur;
- gdouble score, required_score;
+ gdouble score = 0, required_score = 0;
gint got_scores = 0;
rspamd_fprintf (stdout, "[Metric: %s]\n", ucl_object_key (obj));
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index 959d22cd3..6074d637d 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -1432,7 +1432,7 @@ struct rspamd_rcl_section *
rspamd_rcl_config_get_section (struct rspamd_rcl_section *top,
const char *path)
{
- struct rspamd_rcl_section *cur, *found;
+ struct rspamd_rcl_section *cur, *found = NULL;
char **path_components;
gint ncomponents, i;
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 15eed1674..47cdc649f 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -1326,10 +1326,10 @@ static gboolean
rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused)
{
struct expression_argument *arg;
- InternetAddressList *ia;
+ InternetAddressList *ia = NULL;
const gchar *type, *what = NULL;
GList *cur;
- gint i;
+ gint i, ialen;
if (args == NULL) {
msg_warn ("no parameters to function");
@@ -1416,7 +1416,8 @@ rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused)
}
else {
if (ia != NULL) {
- for (i = 0; i < internet_address_list_length(ia); i ++) {
+ ialen = internet_address_list_length(ia);
+ for (i = 0; i < ialen; i ++) {
InternetAddress *iaelt =
internet_address_list_get_address(ia, i);
InternetAddressMailbox *iamb =
@@ -1440,7 +1441,8 @@ rspamd_check_smtp_data (struct rspamd_task *task, GList * args, void *unused)
}
else {
if (ia != NULL) {
- for (i = 0; i < internet_address_list_length(ia); i ++) {
+ ialen = internet_address_list_length(ia);
+ for (i = 0; i < ialen; i ++) {
InternetAddress *iaelt =
internet_address_list_get_address(ia, i);
InternetAddressMailbox *iamb =