Merge pull request #52 from spladug/safelink_segfault
Fix segfault doing SAFELINK check on empty links during HTML render.
This commit is contained in:
commit
03d2e3efa3
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ rndr_link(struct buf *ob, struct buf *link, struct buf *title, struct buf *conte
|
|||
{
|
||||
struct html_renderopt *options = opaque;
|
||||
|
||||
if ((options->flags & HTML_SAFELINK) != 0 && !sd_autolink_issafe(link->data, link->size))
|
||||
if (link != NULL && (options->flags & HTML_SAFELINK) != 0 && !sd_autolink_issafe(link->data, link->size))
|
||||
return 0;
|
||||
|
||||
BUFPUTSL(ob, "<a href=\"");
|
||||
|
|
Loading…
Reference in a new issue