mirror of
https://github.com/mirror/wget.git
synced 2025-01-30 22:30:13 +08:00
Fix crash on 'srcset' inline URIs
* src/html-url.c (tag_handle_img): Check append_url() for NULL return value before dereference. Crashed reproducable with parsing srcset="data:..." inline data. Reported-by: Coverity
This commit is contained in:
parent
40870e1271
commit
a2c4849900
@ -729,8 +729,11 @@ tag_handle_img (int tagid, struct taginfo *tag, struct map_context *ctx) {
|
||||
srcset + url_end);
|
||||
struct urlpos *up = append_url (url_text, base_ind + url_start,
|
||||
url_end - url_start, ctx);
|
||||
up->link_inline_p = 1;
|
||||
up->link_noquote_html_p = 1;
|
||||
if (up)
|
||||
{
|
||||
up->link_inline_p = 1;
|
||||
up->link_noquote_html_p = 1;
|
||||
}
|
||||
xfree (url_text);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user