summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/html.cc2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ea9017fa..f6a155b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@ dillo-2.2 [??]
- Fix cache segfault when cache entry removed.
- Split words that contain whitespace as numeric character references.
- Allow linebreaks around Chinese/Japanese characters.
+ - Fix segfault in Html_parse_doctype (BUG#918).
Patches: corvid
-----------------------------------------------------------------------------
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;