summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-01-02 08:56:45 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-01-02 09:45:18 (GMT)
commit312bef563a5be72f6423377247db1b80044bf711 (patch)
tree3a656445fa67469b2f1783932fe127e9f39af69a /src
parented39dab59f8af2c5b42cfac0b3140cf594412121 (diff)
downloadDoxygen-312bef563a5be72f6423377247db1b80044bf711.zip
Doxygen-312bef563a5be72f6423377247db1b80044bf711.tar.gz
Doxygen-312bef563a5be72f6423377247db1b80044bf711.tar.bz2
Fixed a couple of cases where sharing string data could lead to corruption
Also made dangerous string access more visible by introducing rawData(). This replaces data() which will now return a constant string.
Diffstat (limited to 'src')
-rw-r--r--src/cite.cpp2
-rw-r--r--src/config.l10
-rw-r--r--src/definition.cpp2
-rw-r--r--src/dirdef.cpp2
-rw-r--r--src/docparser.cpp10
-rw-r--r--src/dot.cpp31
-rw-r--r--src/htags.cpp4
-rw-r--r--src/htmlgen.cpp6
-rw-r--r--src/htmlhelp.cpp4
-rw-r--r--src/markdown.cpp2
-rw-r--r--src/marshal.cpp2
-rw-r--r--src/memberdef.cpp2
-rw-r--r--src/membergroup.cpp2
-rw-r--r--src/resourcemgr.cpp4
-rw-r--r--src/rtfgen.cpp7
-rw-r--r--src/tclscanner.l8
-rw-r--r--src/template.cpp4
-rw-r--r--src/tooltip.cpp2
-rw-r--r--src/util.cpp18
-rw-r--r--src/vhdlcode.l4
-rw-r--r--src/vhdljjparser.cpp2
-rw-r--r--src/xmlgen.cpp2
22 files changed, 69 insertions, 61 deletions
diff --git a/src/cite.cpp b/src/cite.cpp
index f0d7d66..e42a6d6 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -211,7 +211,7 @@ void CiteDict::generatePage() const
QCString doc;
QFileInfo fi(citeListFile);
QCString input(fi.size()+1);
- f.readBlock(input.data(),fi.size());
+ f.readBlock(input.rawData(),fi.size());
f.close();
input.at(fi.size())='\0';
int p=0,s;
diff --git a/src/config.l b/src/config.l
index a237faf..2adbbc7 100644
--- a/src/config.l
+++ b/src/config.l
@@ -85,7 +85,7 @@ static QCString convertToComment(const QCString &s, const QCString &u)
if (!s.isEmpty())
{
QCString tmp=s.stripWhiteSpace();
- char *p=tmp.data();
+ const char *p=tmp.data();
char c;
result+="#";
if (*p && *p!='\n')
@@ -495,8 +495,8 @@ static QCString configStringRecode(
}
size_t iLeft=(size_t)inputSize;
size_t oLeft=(size_t)outputSize;
- char *inputPtr = str.data();
- char *outputPtr = output.data();
+ char *inputPtr = str.rawData();
+ char *outputPtr = output.rawData();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
outputSize-=(int)oLeft;
@@ -1695,7 +1695,7 @@ static QCString configFileToString(const char *name)
QCString contents(bSize);
int totalSize=0;
int size;
- while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize)
+ while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
{
totalSize+=bSize;
contents.resize(totalSize+bSize);
@@ -1721,7 +1721,7 @@ static QCString configFileToString(const char *name)
{
int fsize=f.size();
QCString contents(fsize+2);
- f.readBlock(contents.data(),fsize);
+ f.readBlock(contents.rawData(),fsize);
f.close();
if (fsize==0 || contents[fsize-1]=='\n')
contents[fsize]='\0';
diff --git a/src/definition.cpp b/src/definition.cpp
index 6cb26de..8014a37 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -543,7 +543,7 @@ bool Definition::_docsAlreadyAdded(const QCString &doc,QCString &sigList)
// double whitespaces...
QCString docStr = doc.simplifyWhiteSpace();
MD5Buffer((const unsigned char *)docStr.data(),docStr.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
//printf("%s:_docsAlreadyAdded doc='%s' sig='%s' docSigs='%s'\n",
// name().data(),doc.data(),sigStr.data(),sigList.data());
if (sigList.find(sigStr)==-1) // new docs, add signature to prevent re-adding it
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index d4af3f0..37b4c55 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -86,7 +86,7 @@ static QCString encodeDirName(const QCString &anchor)
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
return sigStr;
// old algorithm
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 9a120dc..540eb91 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -236,7 +236,8 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
// replaces &gt; with < and &gt; with > within string s
static void unescapeCRef(QCString &s)
{
- char *p = s.data();
+ QCString tmp(s);
+ char *p = tmp.rawData();
if (p)
{
char c;
@@ -247,8 +248,9 @@ static void unescapeCRef(QCString &s)
}
}
- s=substitute(s,"&lt;","<");
- s=substitute(s,"&gt;",">");
+ tmp=substitute(tmp,"&lt;","<");
+ tmp=substitute(tmp,"&gt;",">");
+ s = tmp;
}
//---------------------------------------------------------------------------
@@ -6939,7 +6941,7 @@ static QCString extractCopyDocId(const char *data, uint &j, uint len)
}
e=j;
QCString id(e-s+1);
- if (e>s) memcpy(id.data(),data+s,e-s);
+ if (e>s) memcpy(id.rawData(),data+s,e-s);
id.at(e-s)='\0';
//printf("extractCopyDocId='%s' input='%s'\n",id.data(),&data[s]);
return id;
diff --git a/src/dot.cpp b/src/dot.cpp
index f9b4302..20dd1e6 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -383,7 +383,7 @@ static bool convertMapFile(FTextStream &t,const char *mapName,
while (!f.atEnd()) // foreach line
{
QCString buf(maxLineLen);
- int numBytes = f.readLine(buf.data(),maxLineLen);
+ int numBytes = f.readLine(buf.rawData(),maxLineLen);
buf[numBytes-1]='\0';
if (buf.left(5)=="<area")
@@ -733,7 +733,7 @@ static bool checkAndUpdateMd5Signature(const QCString &baseName,
{
// read checksum
QCString md5stored(33);
- int bytesRead=f.readBlock(md5stored.data(),32);
+ int bytesRead=f.readBlock(md5stored.rawData(),32);
md5stored[32]='\0';
// compare checksum
if (bytesRead==32 && md5==md5stored)
@@ -988,7 +988,7 @@ bool DotFilePatcher::run()
while (!fi.atEnd()) // foreach line
{
QCString line(maxLineLen);
- int numBytes = fi.readLine(line.data(),maxLineLen);
+ int numBytes = fi.readLine(line.rawData(),maxLineLen);
if (numBytes<=0)
{
break;
@@ -1135,11 +1135,12 @@ bool DotFilePatcher::run()
while (!fi.atEnd()) // foreach line
{
QCString line(maxLineLen);
- int numBytes = fi.readLine(line.data(),maxLineLen);
+ int numBytes = fi.readLine(line.rawData(),maxLineLen);
if (numBytes<=0)
{
break;
}
+ line.resize(numBytes+1);
Map *map = m_maps.at(0); // there is only one 'map' for a SVG file
t << replaceRef(line,map->relPath,map->urlOnly,map->context,"_top");
}
@@ -1964,8 +1965,8 @@ void DotNode::writeXML(FTextStream &t,bool isClassGraph)
if (!m_url.isEmpty())
{
QCString url(m_url);
- char *refPtr = url.data();
- char *urlPtr = strchr(url.data(),'$');
+ const char *refPtr = url.data();
+ char *urlPtr = strchr(url.rawData(),'$');
if (urlPtr)
{
*urlPtr++='\0';
@@ -2032,8 +2033,8 @@ void DotNode::writeDocbook(FTextStream &t,bool isClassGraph)
if (!m_url.isEmpty())
{
QCString url(m_url);
- char *refPtr = url.data();
- char *urlPtr = strchr(url.data(),'$');
+ const char *refPtr = url.data();
+ char *urlPtr = strchr(url.rawData(),'$');
if (urlPtr)
{
*urlPtr++='\0';
@@ -2105,8 +2106,8 @@ void DotNode::writeDEF(FTextStream &t)
if (!m_url.isEmpty())
{
QCString url(m_url);
- char *refPtr = url.data();
- char *urlPtr = strchr(url.data(),'$');
+ const char *refPtr = url.data();
+ char *urlPtr = strchr(url.rawData(),'$');
if (urlPtr)
{
*urlPtr++='\0';
@@ -2300,7 +2301,7 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out,
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
bool regenerate=FALSE;
if (checkAndUpdateMd5Signature(absBaseName,sigStr) ||
!checkDeliverables(absImgName,absMapName))
@@ -3028,7 +3029,7 @@ QCString computeMd5Signature(DotNode *root,
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)buf.data(),buf.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
if (reNumber)
{
resetReNumbering();
@@ -3962,7 +3963,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out,
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
bool regenerate=FALSE;
if (checkAndUpdateMd5Signature(absBaseName,sigStr) ||
!checkDeliverables(graphFormat==GOF_BITMAP ? absImgName :
@@ -4108,7 +4109,7 @@ void generateGraphLegend(const char *path)
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
QCString absBaseName = (QCString)path+"/graph_legend";
QCString absDotName = absBaseName+".dot";
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
@@ -4508,7 +4509,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString baseName = m_diskName;
QCString imgName = baseName+"."+imgExt;
diff --git a/src/htags.cpp b/src/htags.cpp
index 1e18ae1..cbf4aa8 100644
--- a/src/htags.cpp
+++ b/src/htags.cpp
@@ -126,8 +126,10 @@ bool Htags::loadFilemap(const QCString &htmlDir)
line.at(maxlen)='\0';
if (f.open(IO_ReadOnly))
{
- while (f.readLine(line.data(),maxlen)>0)
+ int len;
+ while ((len=f.readLine(line.rawData(),maxlen))>0)
{
+ line.resize(len+1);
//printf("Read line: %s",line.data());
int sep = line.find('\t');
if (sep!=-1)
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 3bb6792..582da45 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -125,7 +125,7 @@ QCString clearBlock(const char *s,const char *begin,const char *end)
QCString result(resLen+1);
char *r;
- for (r=result.data(), p=s; (q=strstr(p,begin))!=0; p=q+endLen)
+ for (r=result.rawData(), p=s; (q=strstr(p,begin))!=0; p=q+endLen)
{
int l = (int)(q-p);
memcpy(r,p,l);
@@ -186,7 +186,7 @@ static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSe
static QCString removeEmptyLines(const QCString &s)
{
BufStr out(s.length()+1);
- char *p=s.data();
+ const char *p=s.data();
if (p)
{
char c;
@@ -194,7 +194,7 @@ static QCString removeEmptyLines(const QCString &s)
{
if (c=='\n')
{
- char *e = p;
+ const char *e = p;
while (*e==' ' || *e=='\t') e++;
if (*e=='\n')
{
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 2629ab3..7c12890 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -599,8 +599,8 @@ QCString HtmlHelp::recode(const QCString &s)
QCString output(oSize);
size_t iLeft = iSize;
size_t oLeft = oSize;
- char *iPtr = s.data();
- char *oPtr = output.data();
+ char *iPtr = s.rawData();
+ char *oPtr = output.rawData();
if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
{
oSize -= (int)oLeft;
diff --git a/src/markdown.cpp b/src/markdown.cpp
index fdf1b0f..414aa19 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -132,7 +132,7 @@ static void convertStringFragment(QCString &result,const char *data,int size)
{
if (size<0) size=0;
result.resize(size+1);
- memcpy(result.data(),data,size);
+ memcpy(result.rawData(),data,size);
result.at(size)='\0';
}
diff --git a/src/marshal.cpp b/src/marshal.cpp
index 04f426d..af14978 100644
--- a/src/marshal.cpp
+++ b/src/marshal.cpp
@@ -456,7 +456,7 @@ QCString unmarshalQCString(StorageIntf *s)
result.at(len)='\0';
if (len>0)
{
- s->read(result.data(),len);
+ s->read(result.rawData(),len);
}
//printf("unmarshalQCString: result=%s\n",result.data());
return result;
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 72f3e3c..375260e 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -3331,7 +3331,7 @@ void MemberDef::setAnchor()
QCString sigStr(33);
MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig);
//printf("memAnchor=%s\n",memAnchor.data());
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
m_impl->anc = "a"+sigStr;
}
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index aa0a36e..d073173 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -312,7 +312,7 @@ QCString MemberGroup::anchor() const
QCString locHeader = grpHeader;
if (locHeader.isEmpty()) locHeader="[NOHEADER]";
MD5Buffer((const unsigned char *)locHeader.data(),locHeader.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
return "amgrp"+sigStr;
}
diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp
index a15a702..4b504e4 100644
--- a/src/resourcemgr.cpp
+++ b/src/resourcemgr.cpp
@@ -132,7 +132,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
if (f.open(IO_WriteOnly))
{
QCString buf(res->size+1);
- memcpy(buf.data(),res->data,res->size);
+ memcpy(buf.rawData(),res->data,res->size);
FTextStream t(&f);
buf = replaceColorMarkers(buf);
if (qstrcmp(name,"navtree.css")==0)
@@ -172,7 +172,7 @@ QCString ResourceMgr::getAsString(const char *name) const
if (res)
{
QCString result(res->size+1);
- memcpy(result.data(),res->data,res->size);
+ memcpy(result.rawData(),res->data,res->size);
return result;
}
else
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 354469b..2a6fd07 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -2362,19 +2362,22 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl
// this is EXTREEEEEEEMLY brittle. It works on OUR rtf
// files because the first line before the body
// ALWAYS contains "{\comment begin body}"
+ int len;
do
{
- if (f.readLine(lineBuf.data(),maxLineLength)==-1)
+ if ((len=f.readLine(lineBuf.rawData(),maxLineLength))==-1)
{
err("read error in %s before end of RTF header!\n",infName.data());
return FALSE;
}
+ lineBuf.resize(len+1);
if (bIncludeHeader) encodeForOutput(t,lineBuf.data());
} while (lineBuf.find("\\comment begin body")==-1);
- while (f.readLine(lineBuf.data(),maxLineLength)!=-1)
+ while ((len=f.readLine(lineBuf.rawData(),maxLineLength))!=-1)
{
+ lineBuf.resize(len+1);
int pos;
if ((pos=lineBuf.find("INCLUDETEXT"))!=-1)
{
diff --git a/src/tclscanner.l b/src/tclscanner.l
index f162637..198fd85 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -657,7 +657,7 @@ static void tcl_font_end()
}
//! Codify 'str' with special font class 's'.
-static void tcl_codify(const char *s,char *str)
+static void tcl_codify(const char *s,const char *str)
{
if (!tcl.code || !str) return;
if (s && qstrcmp(s,"NULL")!=0)
@@ -666,7 +666,7 @@ static void tcl_codify(const char *s,char *str)
tcl.code->startFontClass(s);
tcl.code_font=s;
}
- char *p=str,*sp=p;
+ const char *p=str,*sp=p;
char c;
bool done=FALSE;
while (!done)
@@ -676,7 +676,7 @@ static void tcl_codify(const char *s,char *str)
if (c=='\n')
{
tcl.code_line++;
- *(p-1)='\0';
+ // *(p-1)='\0'; // Dimitri: is this really needed?
tcl.code->codify(sp);
if (tcl.code_font)
{
@@ -719,7 +719,6 @@ static void tcl_codify(const char *s,const QString &str)
if (tcl.code==NULL) return;
tcl_codify(s,str.utf8());
}
-#endif
//! Codify 'str' with special font class 's'.
static void tcl_codify(const char *s,const QCString &str)
@@ -727,6 +726,7 @@ static void tcl_codify(const char *s,const QCString &str)
if (!tcl.code) return;
tcl_codify(s,str.data());
}
+#endif
static void tcl_codify_cmd(const char *s,int i)
{
diff --git a/src/template.cpp b/src/template.cpp
index 9fa03aa..a9fab94 100644
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -4395,7 +4395,7 @@ TemplateLexer::TemplateLexer(const TemplateEngine *engine,const QCString &fileNa
m_engine(engine), m_fileName(fileName)
{
m_data.resize(size+1);
- memcpy(m_data.data(),data,size);
+ memcpy(m_data.rawData(),data,size);
m_data[size]=0;
}
@@ -4602,7 +4602,7 @@ void TemplateLexer::addToken(QList<TemplateToken> &tokens,
{
int len = endPos-startPos+1;
QCString text(len);
- qstrncpy(text.data(),data+startPos,len);
+ qstrncpy(text.rawData(),data+startPos,len);
if (type!=TemplateToken::Text) text = text.stripWhiteSpace();
tokens.append(new TemplateToken(type,text,line));
}
diff --git a/src/tooltip.cpp b/src/tooltip.cpp
index 8085bff..8db0394 100644
--- a/src/tooltip.cpp
+++ b/src/tooltip.cpp
@@ -59,7 +59,7 @@ void TooltipManager::clearTooltips()
static QCString escapeId(const char *s)
{
QCString res=s;
- char *p=res.data();
+ char *p=res.rawData();
while (*p)
{
if (!isId(*p)) *p='_';
diff --git a/src/util.cpp b/src/util.cpp
index 000de53..1639e0a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1448,7 +1448,7 @@ static ClassDef *getResolvedClassRec(Definition *scope,
// below is a more efficient coding of
// QCString key=scope->name()+"+"+name+"+"+explicitScopePart;
QCString key(scopeNameLen+nameLen+explicitPartLen+fileScopeLen+1);
- char *p=key.data();
+ char *p=key.rawData();
qstrcpy(p,scope->name()); *(p+scopeNameLen-1)='+';
p+=scopeNameLen;
qstrcpy(p,name); *(p+nameLen-1)='+';
@@ -2379,8 +2379,8 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
{
size_t iLeft=inputSize;
size_t oLeft=outputSize;
- char *inputPtr = input.data();
- char *outputPtr = output.data();
+ char *inputPtr = input.rawData();
+ char *outputPtr = output.rawData();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
outputSize-=(int)oLeft;
@@ -2418,12 +2418,12 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
QCString contents(bSize);
int totalSize=0;
int size;
- while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize)
+ while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
{
totalSize+=bSize;
- contents.resize(totalSize+bSize);
+ contents.resize(totalSize+bSize);
}
- totalSize = filterCRLF(contents.data(),totalSize+size)+2;
+ totalSize = filterCRLF(contents.rawData(),totalSize+size)+2;
contents.resize(totalSize);
contents.at(totalSize-2)='\n'; // to help the scanner
contents.at(totalSize-1)='\0';
@@ -5060,7 +5060,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst)
}
QCString result(resLen+1);
char *r;
- for (r=result.data(), p=s; (q=strstr(p,src))!=0; p=q+srcLen)
+ for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen)
{
int l = (int)(q-p);
memcpy(r,p,l);
@@ -5340,7 +5340,7 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)result.data(),resultLen,md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5SigToString(md5_sig,sigStr.rawData(),33);
result=result.left(128-32)+sigStr;
}
}
@@ -6550,7 +6550,7 @@ QCString rtfFormatBmkStr(const char *name)
g_tagDict.insert( key, tag );
// This is the increment part
- char* nxtTag = g_nextTag.data() + g_nextTag.length() - 1;
+ char* nxtTag = g_nextTag.rawData() + g_nextTag.length() - 1;
for ( unsigned int i = 0; i < g_nextTag.length(); ++i, --nxtTag )
{
if ( ( ++(*nxtTag) ) > 'Z' )
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index fa199d1..5f328af 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -620,7 +620,7 @@ static void appStringLower(QCString& qcs,const char* text)
static QCString g_temp;
/* writes and links a port map statement */
-static void codifyMapLines(char *text)
+static void codifyMapLines(const char *text)
{
if (text==0) return;
g_temp.resize(0);
@@ -628,7 +628,7 @@ static void codifyMapLines(char *text)
int wordCounter=0;
QCString ctemp;
//printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text);
- char *p=text; //,*sp=p;
+ const char *p=text; //,*sp=p;
char c;
bool done=FALSE;
while (!done)
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index 7b0c112..c3f8663 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -396,7 +396,7 @@ void VHDLLanguageScanner::parsePrototype(const char *text)
varr=TRUE;
}
-void VhdlParser::addCompInst(char *n, char* instName, char* comp,int iLine)
+void VhdlParser::addCompInst(const char *n, const char* instName, const char* comp,int iLine)
{
current->spec=VhdlDocGen::INSTANTIATION;
current->section=Entry::VARIABLE_SEC;
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 8e1d02f..8319922 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1865,7 +1865,7 @@ void generateXML()
if (len>0)
{
QCString s(len+1);
- qstrncpy(s.data(),startLine,len);
+ qstrncpy(s.rawData(),startLine,len);
s[len]='\0';
if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
{