Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
markdown: fix NULL pointer dereference crash
  • Loading branch information
perexg committed Apr 2, 2016
1 parent 264b4ec commit c0c7b35
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/webui/doc_md.c
Expand Up @@ -146,11 +146,13 @@ http_markdown_class(http_connection_t *hc, const char *clazz)
md_header(hq, "##", s);
nl = md_nl(hq, 1);
}
for (; *doc; doc++) {
if (*doc[0] == '\xff') {
htsbuf_append_str(hq, tvh_gettext_lang(lang, *doc + 1));
} else {
htsbuf_append_str(hq, *doc);
if (doc) {
for (; *doc; doc++) {
if (*doc[0] == '\xff') {
htsbuf_append_str(hq, tvh_gettext_lang(lang, *doc + 1));
} else {
htsbuf_append_str(hq, *doc);
}
}
}
l = htsmsg_get_list(m, "props");
Expand Down

0 comments on commit c0c7b35

Please sign in to comment.