summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rtfgen.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 0c27089..3f09eec 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -2365,17 +2365,21 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl
int len;
do
{
+ lineBuf.resize(maxLineLength);
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);
+ lineBuf.resize(maxLineLength);
while ((len=f.readLine(lineBuf.rawData(),maxLineLength))!=-1)
{
+ lineBuf.resize(len+1);
int pos;
if ((pos=lineBuf.find("INCLUDETEXT"))!=-1)
{
@@ -2407,6 +2411,7 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl
encodeForOutput(t,lineBuf);
}
}
+ lineBuf.resize(maxLineLength);
}
f.close();
// remove temporary file