]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix check for image urls
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 28 Jul 2021 13:57:15 +0000 (14:57 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 29 Jul 2021 09:33:31 +0000 (10:33 +0100)
src/libserver/html/html.cxx

index 0d76a22da90b02ce7a252d34d61e496767225df8..53fe815ddfea4784b32a2b954e545b0a98271734 100644 (file)
@@ -823,9 +823,10 @@ html_process_img_tag(rspamd_mempool_t *pool,
                                                                struct rspamd_url *existing;
 
                                                                img->url->flags |= RSPAMD_URL_FLAG_IMAGE;
-                                                               existing = rspamd_url_set_add_or_return(url_set, img->url);
+                                                               existing = rspamd_url_set_add_or_return(url_set,
+                                                                               img->url);
 
-                                                               if (existing != img->url) {
+                                                               if (existing && existing != img->url) {
                                                                        /*
                                                                         * We have some other URL that could be
                                                                         * found, e.g. from another part. However,