summaryrefslogtreecommitdiffstats
path: root/src/dkim.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-05-24 13:11:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-05-24 13:11:52 +0100
commit3b025570d4fd2bdd92c1a588ae494c4e2aa4db43 (patch)
tree5b325e29585bfc408ad9ea0bf13cdd55913e6820 /src/dkim.c
parent08466d29088eff168eb153bef4aad59f02312a21 (diff)
downloadrspamd-3b025570d4fd2bdd92c1a588ae494c4e2aa4db43.tar.gz
rspamd-3b025570d4fd2bdd92c1a588ae494c4e2aa4db43.zip
Fix several potential problems found by static analysis.
Diffstat (limited to 'src/dkim.c')
-rw-r--r--src/dkim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dkim.c b/src/dkim.c
index feb11893d..157b13aee 100644
--- a/src/dkim.c
+++ b/src/dkim.c
@@ -579,14 +579,14 @@ rspamd_create_dkim_context (const gchar *sig, memory_pool_t *pool, guint time_ji
}
if (new->sig_alg == DKIM_SIGN_RSASHA1) {
/* Check bh length */
- if (new->bhlen != g_checksum_type_get_length (G_CHECKSUM_SHA1)) {
+ if (new->bhlen != (guint)g_checksum_type_get_length (G_CHECKSUM_SHA1)) {
g_set_error (err, DKIM_ERROR, DKIM_SIGERROR_BADSIG, "signature has incorrect length: %ud", new->bhlen);
return NULL;
}
}
else if (new->sig_alg == DKIM_SIGN_RSASHA256) {
- if (new->bhlen != g_checksum_type_get_length (G_CHECKSUM_SHA256)) {
+ if (new->bhlen != (guint)g_checksum_type_get_length (G_CHECKSUM_SHA256)) {
g_set_error (err, DKIM_ERROR, DKIM_SIGERROR_BADSIG, "signature has incorrect length: %ud", new->bhlen);
return NULL;
}