summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-04-21 18:39:15 (GMT)
committerGitHub <noreply@github.com>2019-04-21 18:39:15 (GMT)
commitf1d248c6873253b0c0628ad69b0aa917601a0fa5 (patch)
tree71a91ce0901b4104a07e751d508cd8159a6a1c27 /src
parentf241f6c736a5fb59728cfe1af7d1d4d3f384e9a6 (diff)
parent5428d2fe73e5e80bcf580d0c0506c0e3cff23cc6 (diff)
downloadDoxygen-f1d248c6873253b0c0628ad69b0aa917601a0fa5.zip
Doxygen-f1d248c6873253b0c0628ad69b0aa917601a0fa5.tar.gz
Doxygen-f1d248c6873253b0c0628ad69b0aa917601a0fa5.tar.bz2
Merge pull request #6922 from albert-github/feature/issue_6917
issue #6917 Crash in php with UTF-8 character
Diffstat (limited to 'src')
-rw-r--r--src/doctokenizer.l10
-rw-r--r--src/util.cpp8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 5cf5f02..7b402ca 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -211,7 +211,7 @@ static void handleHtmlTag()
{
char c=tagText.at(i);
// skip spaces
- while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); }
+ while (i<(int)yyleng && isspace((uchar)c)) { c=tagText.at(++i); }
// check for end of the tag
if (c == '>') break;
// Check for XML style "empty" tag.
@@ -222,17 +222,17 @@ static void handleHtmlTag()
}
startName=i;
// search for end of name
- while (i<(int)yyleng && !isspace(c) && c!='=') { c=tagText.at(++i); }
+ while (i<(int)yyleng && !isspace((uchar)c) && c!='=') { c=tagText.at(++i); }
endName=i;
HtmlAttrib opt;
opt.name = tagText.mid(startName,endName-startName).lower();
// skip spaces
- while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); }
+ while (i<(int)yyleng && isspace((uchar)c)) { c=tagText.at(++i); }
if (tagText.at(i)=='=') // option has value
{
c=tagText.at(++i);
// skip spaces
- while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); }
+ while (i<(int)yyleng && isspace((uchar)c)) { c=tagText.at(++i); }
if (tagText.at(i)=='\'') // option '...'
{
c=tagText.at(++i);
@@ -256,7 +256,7 @@ static void handleHtmlTag()
{
startAttrib=i;
// search for separator or end symbol
- while (i<(int)yyleng && !isspace(c) && c!='>') { c=tagText.at(++i); }
+ while (i<(int)yyleng && !isspace((uchar)c) && c!='>') { c=tagText.at(++i); }
endAttrib=i;
if (i<(int)yyleng) c=tagText.at(++i);
}
diff --git a/src/util.cpp b/src/util.cpp
index e6fece3..5a69bcb 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1869,7 +1869,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
case '@': // '@name' -> ' @name'
case '$': // '$name' -> ' $name'
case '\'': // ''name' -> '' name'
- if (i>0 && i<l-1 && pc!='=' && pc!=':' && !isspace(pc) &&
+ if (i>0 && i<l-1 && pc!='=' && pc!=':' && !isspace((uchar)pc) &&
isId(nc) && osp<8) // ")id" -> ") id"
{
*dst++=' ';
@@ -1913,14 +1913,14 @@ QCString removeRedundantWhiteSpace(const QCString &s)
default:
*dst++=c;
if (c=='t' && csp==5 && i<l-1 && // found 't' in 'const'
- !(isId(nc) || nc==')' || nc==',' || isspace(nc))
+ !(isId(nc) || nc==')' || nc==',' || isspace((uchar)nc))
) // prevent const ::A from being converted to const::A
{
*dst++=' ';
csp=0;
}
else if (c=='l' && vsp==7 && i<l-1 && // found 'l' in 'virtual'
- !(isId(nc) || nc==')' || nc==',' || isspace(nc))
+ !(isId(nc) || nc==')' || nc==',' || isspace((uchar)nc))
) // prevent virtual ::A from being converted to virtual::A
{
*dst++=' ';
@@ -7199,7 +7199,7 @@ bool findAndRemoveWord(QCString &s,const QCString &word)
{
if (i>0 && isspace((uchar)s.at(i-1)))
i--,l++;
- else if (i+l<(int)s.length() && isspace(s.at(i+l)))
+ else if (i+l<(int)s.length() && isspace((uchar)s.at(i+l)))
l++;
s = s.left(i)+s.mid(i+l); // remove word + spacing
return TRUE;