diff options
| author | Simon Tatham <anakin@pobox.com> | 1999-10-22 19:35:26 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 1999-10-22 19:35:26 +0000 |
| commit | 2085f874f8ee88e8953a76c578f870cb6679534d (patch) | |
| tree | c7ec9374db604b517fac692b9edd823dee2e7873 /input.c | |
| parent | 8f484cb522ea01737fad808702f61bc20a5c7996 (diff) | |
| download | halibut-2085f874f8ee88e8953a76c578f870cb6679534d.zip halibut-2085f874f8ee88e8953a76c578f870cb6679534d.tar.gz halibut-2085f874f8ee88e8953a76c578f870cb6679534d.tar.bz2 halibut-2085f874f8ee88e8953a76c578f870cb6679534d.tar.xz | |
Fix a couple of segfaults in error handling code
[originally from svn r250]
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -486,10 +486,11 @@ static void read_file(paragraph ***ret, input *in, index *idx) { addpara(par, ret); while (t.type != tok_eop) /* error recovery: */ dtor(t), t = get_token(in); /* eat rest of paragraph */ - continue; + goto codeparabroken; /* ick, but such is life */ } } addpara(par, ret); + codeparabroken: continue; } @@ -768,8 +769,10 @@ static void read_file(paragraph ***ret, input *in, index *idx) { already = TRUE; wdtext = ustrftime(NULL, broken); wd.type = style; - } else + } else { error(err_explbr, &t.pos); + wdtext = NULL; + } } else { rdstring rs = { 0, 0, NULL }; while (dtor(t), t = get_token(in), |