diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-13 11:03:31 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-13 11:03:31 +0000 |
commit | e7106966d6e23a19bdc77dc5a742a379f34292f9 (patch) | |
tree | 1279ec199b3791c04008d95fc5698a24dc664a32 /src/libserver | |
parent | 172f7ccc701c35109d1fe25a2470938a243bedb3 (diff) | |
download | rspamd-e7106966d6e23a19bdc77dc5a742a379f34292f9.tar.gz rspamd-e7106966d6e23a19bdc77dc5a742a379f34292f9.zip |
[Minor] Fix cast
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/html.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index fb2a8a477..3fb24c22e 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1267,7 +1267,7 @@ rspamd_html_process_url (rspamd_mempool_t *pool, const gchar *start, guint len, dlen = 0; for (i = 0; i < len; i ++) { - if (G_UNLIKELY (!g_ascii_isgraph (s[i]))) { + if (G_UNLIKELY (((guint)s[i]) < 0x80 && !g_ascii_isgraph (s[i]))) { dlen += 3; } else { @@ -1283,7 +1283,7 @@ rspamd_html_process_url (rspamd_mempool_t *pool, const gchar *start, guint len, if (G_UNLIKELY (s[i] == '\r' || s[i] == '\n')) { continue; } - else if (G_UNLIKELY (s[i] < 0x80 && !g_ascii_isgraph (s[i]))) { + else if (G_UNLIKELY (((guint)s[i]) < 0x80 && !g_ascii_isgraph (s[i]))) { /* URL encode */ *d++ = '%'; *d++ = hexdigests[(s[i] >> 4) & 0xf]; |