lynx/lynx-crash.patch

35 lines
869 B
Diff
Raw Normal View History

--- lynx2-8-5/src/HTML.c.crash 2005-01-06 17:03:09.658969996 +0000
+++ lynx2-8-5/src/HTML.c 2005-01-06 17:07:24.096481825 +0000
@@ -7001,7 +7001,7 @@
case HTML_SELECT:
{
- char *ptr;
+ char *ptr = NULL;
/*
* Make sure we had a select start tag.
@@ -7041,13 +7041,15 @@
/*
* Finish the previous option.
*/
- ptr = HText_setLastOptionValue(me->text,
- me->option.data,
- me->LastOptionValue,
- LAST_ORDER,
- me->LastOptionChecked,
- me->UCLYhndl,
- ATTR_CS_IN);
+ if (!me->first_option)
+ ptr = HText_setLastOptionValue(me->text,
+ me->option.data,
+ me->LastOptionValue,
+ LAST_ORDER,
+ me->LastOptionChecked,
+ me->UCLYhndl,
+ ATTR_CS_IN);
+
FREE(me->LastOptionValue);
me->LastOptionChecked = FALSE;