Erich Hoover : hhctrl.ocx: Keep parsing failure from causing a segmentation fault.
Alexandre Julliard
julliard at winehq.org
Tue Jun 26 13:34:16 CDT 2012
Module: wine
Branch: master
Commit: b72ac222ea8b59eae17efbdff57cbfd82e3badd6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b72ac222ea8b59eae17efbdff57cbfd82e3badd6
Author: Erich Hoover <ehoover at mines.edu>
Date: Mon Jun 25 08:54:47 2012 -0600
hhctrl.ocx: Keep parsing failure from causing a segmentation fault.
---
dlls/hhctrl.ocx/index.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/hhctrl.ocx/index.c b/dlls/hhctrl.ocx/index.c
index 3cf69de..2cc79a6 100644
--- a/dlls/hhctrl.ocx/index.c
+++ b/dlls/hhctrl.ocx/index.c
@@ -191,6 +191,8 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream)
strbuf_zero(&node);
}
+ if(!ret)
+ FIXME("Failed to parse <li> tag!\n");
strbuf_free(&node);
strbuf_free(&node_name);
@@ -227,9 +229,11 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
if(!strcasecmp(node_name.buf, "li")) {
item->next = parse_li(info, &stream);
- item->next->merge = item->merge;
- item = item->next;
- item->indentLevel = indent_level;
+ if(item->next) {
+ item->next->merge = item->merge;
+ item = item->next;
+ item->indentLevel = indent_level;
+ }
}else if(!strcasecmp(node_name.buf, "ul")) {
indent_level++;
}else if(!strcasecmp(node_name.buf, "/ul")) {
More information about the wine-cvs
mailing list