summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2009-08-09 11:16:49 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2009-08-09 11:16:49 +0000
commit4a5b03862209236ce66103e379544f2e1e0f8853 (patch)
treee59d4fbffa643f766182eead30030c72ed734949 /gnu/usr.bin
parent2220ced8170aff304378109d961c32d6fc55779b (diff)
Initialize all the InputFieldData members correctly. Fixes a crash when
going for example to http://thawte.com/. deraadt@ otto@ ok
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/lynx/src/HTML.c65
1 files changed, 4 insertions, 61 deletions
diff --git a/gnu/usr.bin/lynx/src/HTML.c b/gnu/usr.bin/lynx/src/HTML.c
index 01a3ed1f4b7..5911cc28431 100644
--- a/gnu/usr.bin/lynx/src/HTML.c
+++ b/gnu/usr.bin/lynx/src/HTML.c
@@ -4286,26 +4286,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
int chars;
/* init */
- I.align = NULL;
- I.accept = NULL;
- I.checked = NO;
- I.iclass = NULL;
- I.disabled = NO;
- I.error = NULL;
- I.height = NULL;
- I.id = NULL;
- I.lang = NULL;
- I.max = NULL;
- I.maxlength = NULL;
- I.md = NULL;
- I.min = NULL;
- I.name = NULL;
- I.size = 0;
- I.src = NULL;
- I.type = NULL;
- I.value = NULL;
- I.width = NULL;
- I.accept_cs = NULL;
+ memset(&I, 0, sizeof(I));
I.name_cs = ATTR_CS_IN;
I.value_cs = ATTR_CS_IN;
@@ -4475,26 +4456,7 @@ static int HTML_start_element(HTStructured * me, int element_number,
HTkcode specified_kcode = NOKANJI;
/* init */
- I.align = NULL;
- I.accept = NULL;
- I.checked = NO;
- I.iclass = NULL;
- I.disabled = NO;
- I.error = NULL;
- I.height = NULL;
- I.id = NULL;
- I.lang = NULL;
- I.max = NULL;
- I.maxlength = NULL;
- I.md = NULL;
- I.min = NULL;
- I.name = NULL;
- I.size = 0;
- I.src = NULL;
- I.type = NULL;
- I.value = NULL;
- I.width = NULL;
- I.accept_cs = NULL;
+ memset(&I, 0, sizeof(I));
I.name_cs = ATTR_CS_IN;
I.value_cs = ATTR_CS_IN;
@@ -5150,9 +5112,8 @@ static int HTML_start_element(HTStructured * me, int element_number,
/*
* Inititialize.
*/
- I.accept_cs = NULL;
+ memset(&I, 0, sizeof(I));
I.name_cs = -1;
- I.maxlength = NULL;
I.value_cs = current_char_set;
I.type = "OPTION";
@@ -6779,25 +6740,7 @@ static int HTML_end_element(HTStructured * me, int element_number,
/*
* Initialize.
*/
- I.align = NULL;
- I.accept = NULL;
- I.checked = NO;
- I.iclass = NULL;
- I.disabled = NO;
- I.error = NULL;
- I.height = NULL;
- I.id = NULL;
- I.lang = NULL;
- I.max = NULL;
- I.maxlength = NULL;
- I.md = NULL;
- I.min = NULL;
- I.name = NULL;
- I.size = 0;
- I.src = NULL;
- I.type = NULL;
- I.value = NULL;
- I.width = NULL;
+ memset(&I, 0, sizeof(I));
I.value_cs = current_char_set;
UPDATE_STYLE;