summaryrefslogtreecommitdiff
path: root/libmu_sieve/extensions/moderator.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-07-23 08:04:38 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-07-23 08:04:38 +0300
commit018df5d628f4e093f7e45c00b48ffc11b234d8cf (patch)
treec360d39b523c8327c6b029531b7a0f345dc4eecd /libmu_sieve/extensions/moderator.c
parentbd46cf8d48852639e10e66a87500f7b9ec18e1ef (diff)
downloadmailutils-018df5d628f4e093f7e45c00b48ffc11b234d8cf.tar.gz
mailutils-018df5d628f4e093f7e45c00b48ffc11b234d8cf.tar.bz2
Minor fix
Check return from mu_message_get_num_parts
Diffstat (limited to 'libmu_sieve/extensions/moderator.c')
-rw-r--r--libmu_sieve/extensions/moderator.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libmu_sieve/extensions/moderator.c b/libmu_sieve/extensions/moderator.c
index 3544d88f9..4fe2e8375 100644
--- a/libmu_sieve/extensions/moderator.c
+++ b/libmu_sieve/extensions/moderator.c
@@ -284,8 +284,13 @@ moderator_action (mu_sieve_machine_t mach)
mu_sieve_abort (mach);
}
- mu_message_get_num_parts (msg, &nparts);
-
+ rc = mu_message_get_num_parts (msg, &nparts);
+ if (rc)
+ {
+ mu_sieve_error (mach, "mu_message_get_num_parts: %s", mu_strerror (rc));
+ mu_sieve_abort (mach);
+ }
+
if (nparts != 3) /* Mailman moderation requests have three parts */
{
mu_sieve_error (mach, _("expected 3 parts, but found %lu"),

Return to:

Send suggestions and report system problems to the System administrator.