Commit b72ac222 authored by Erich Hoover's avatar Erich Hoover Committed by Alexandre Julliard

hhctrl.ocx: Keep parsing failure from causing a segmentation fault.

parent 07795754
...@@ -191,6 +191,8 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream) ...@@ -191,6 +191,8 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream)
strbuf_zero(&node); strbuf_zero(&node);
} }
if(!ret)
FIXME("Failed to parse <li> tag!\n");
strbuf_free(&node); strbuf_free(&node);
strbuf_free(&node_name); strbuf_free(&node_name);
...@@ -227,9 +229,11 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item) ...@@ -227,9 +229,11 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
if(!strcasecmp(node_name.buf, "li")) { if(!strcasecmp(node_name.buf, "li")) {
item->next = parse_li(info, &stream); item->next = parse_li(info, &stream);
item->next->merge = item->merge; if(item->next) {
item = item->next; item->next->merge = item->merge;
item->indentLevel = indent_level; item = item->next;
item->indentLevel = indent_level;
}
}else if(!strcasecmp(node_name.buf, "ul")) { }else if(!strcasecmp(node_name.buf, "ul")) {
indent_level++; indent_level++;
}else if(!strcasecmp(node_name.buf, "/ul")) { }else if(!strcasecmp(node_name.buf, "/ul")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment