Преглед изворни кода

Skip incomplete attachments.

grunfink пре 1 година
родитељ
комит
cbf71ca0ca
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      html.c

+ 3 - 0
html.c

@@ -2427,6 +2427,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
             const char *o_href = xs_dict_get(a, "href");
             const char *o_href = xs_dict_get(a, "href");
             const char *name = xs_dict_get(a, "name");
             const char *name = xs_dict_get(a, "name");
 
 
+            if (!xs_is_string(type) || !xs_is_string(o_href))
+                continue;
+
             /* if this URL is already in the post content, skip */
             /* if this URL is already in the post content, skip */
             if (content && xs_str_in(content, o_href) != -1)
             if (content && xs_str_in(content, o_href) != -1)
                 continue;
                 continue;