diff options
author | corvid <corvid@lavabit.com> | 2009-08-02 15:45:51 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-08-02 15:45:51 +0000 |
commit | 4760495cae7967364a97f9d59b73454ab03ee772 (patch) | |
tree | ab7ab65cf07f4a95988d6116682092646a4a8e04 /src/html.cc | |
parent | 6b86ff84a0c8255525d0984cab43519a99395e3b (diff) |
fix segfault in Html_parse_doctype
BUG 918.
http://www.freiesmagazin.de/mobil/freiesMagazin-2009-08-bilder.html
contained
<!DOCTYPE HTML PUBLIC //W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
so the last character in the tag was an open quote.
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc index a8b15c61..a8412f43 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1498,7 +1498,7 @@ static void Html_parse_doctype(DilloHtml *html, const char *tag, int tagsize) if (isspace(*p)) { for (ntag[i++] = ' '; isspace(p[1]); ++p) ; } else if ((quote = *p) == '"' || *p == '\'') { - for (ntag[i++] = *p++; (ntag[i++] = *p) && *p != quote; ++p) { + for (ntag[i++] = *p++; (ntag[i] = *p) && ntag[i++] != quote; ++p) { if (*p == '\n' || *p == '\r') ntag[i - 1] = ' '; p += (p[0] == '\r' && p[1] == '\n') ? 1 : 0; |