diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-09 11:01:50 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-09 11:01:50 +0100 |
commit | 989b808302248f1f8a51724984fdfa97925f5e21 (patch) | |
tree | 6a30f0d59111071d9a3fbb64f42d7dc167e42745 /src/libserver/html.c | |
parent | 53a6f9ec822d73a83e7d1221aec1cafac8d16585 (diff) | |
download | rspamd-989b808302248f1f8a51724984fdfa97925f5e21.tar.gz rspamd-989b808302248f1f8a51724984fdfa97925f5e21.zip |
[Minor] More strict boundaries checks and composites policies fix
Diffstat (limited to 'src/libserver/html.c')
-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 00b4e24a5..1e6aa002a 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1445,7 +1445,7 @@ rspamd_html_process_url (rspamd_mempool_t *pool, const gchar *start, guint len, /* Strip spaces from the url */ /* Head spaces */ - while (g_ascii_isspace (*p) && p < start + len) { + while ( p < start + len && g_ascii_isspace (*p)) { p ++; start ++; len --; @@ -1459,7 +1459,7 @@ rspamd_html_process_url (rspamd_mempool_t *pool, const gchar *start, guint len, /* Trailing spaces */ p = start + len - 1; - while (g_ascii_isspace (*p) && p >= start) { + while (p >= start && g_ascii_isspace (*p)) { p --; len --; |