]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Always try to use height and width for images
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Mar 2016 09:19:34 +0000 (09:19 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Mar 2016 09:19:34 +0000 (09:19 +0000)
src/libserver/html.c

index 9c2551fe098f01797db010defc858511d5540bfe..628616a77ae9ecd9fb94e31f1acbed3742c80351 100644 (file)
@@ -1281,16 +1281,15 @@ rspamd_html_process_img_tag (rspamd_mempool_t *pool, struct html_tag *tag,
                        }
                }
                else if (comp->type == RSPAMD_HTML_COMPONENT_HEIGHT) {
-                       if (rspamd_strtoul (comp->start, comp->len, &val)) {
-                               img->height = val;
-                       }
+                       rspamd_strtoul (comp->start, comp->len, &val);
+                       img->height = val;
                }
                else if (comp->type == RSPAMD_HTML_COMPONENT_WIDTH) {
-                       if (rspamd_strtoul (comp->start, comp->len, &val)) {
-                               img->width = val;
-                       }
+                       rspamd_strtoul (comp->start, comp->len, &val);
+                       img->width = val;
                }
 
+
                cur = g_list_next (cur);
        }