Blame doxgen-1.9.1-crash-when-parsing-config-file.patch

Than Ngo 16e4f9
commit 3b15963316b59cd1af3468a43535d90343916ffb
Than Ngo 16e4f9
Author: Dimitri van Heesch <doxygen@gmail.com>
Than Ngo 16e4f9
Date:   Mon Jan 18 19:59:16 2021 +0100
Than Ngo 16e4f9
Than Ngo 16e4f9
    issue #8343: doxygen-1.9.1 crashes when parsing config file
Than Ngo 16e4f9
Than Ngo 16e4f9
diff --git a/src/configimpl.l b/src/configimpl.l
Than Ngo 16e4f9
index 7f73ec01..56a2e108 100644
Than Ngo 16e4f9
--- a/src/configimpl.l
Than Ngo 16e4f9
+++ b/src/configimpl.l
Than Ngo 16e4f9
@@ -1210,7 +1210,7 @@ static void substEnvVarsInStrList(StringVector &sl)
Than Ngo 16e4f9
               c=result.at(i);
Than Ngo 16e4f9
               if (c=='"') // end quote
Than Ngo 16e4f9
               {
Than Ngo 16e4f9
-                results.push_back(result.mid(p,i-p).data());
Than Ngo 16e4f9
+                results.push_back(result.mid(p,i-p).str());
Than Ngo 16e4f9
                 p=i+1;
Than Ngo 16e4f9
                 break;
Than Ngo 16e4f9
               }
Than Ngo 16e4f9
@@ -1222,7 +1222,7 @@ static void substEnvVarsInStrList(StringVector &sl)
Than Ngo 16e4f9
           }
Than Ngo 16e4f9
           else if (c==' ' || c=='\t') // separator
Than Ngo 16e4f9
           {
Than Ngo 16e4f9
-            if (i>p) results.push_back(result.mid(p,i-p).data());
Than Ngo 16e4f9
+            if (i>p) results.push_back(result.mid(p,i-p).str());
Than Ngo 16e4f9
             p=i+1;
Than Ngo 16e4f9
           }
Than Ngo 16e4f9
         }
Than Ngo 16e4f9
@@ -1234,7 +1234,7 @@ static void substEnvVarsInStrList(StringVector &sl)
Than Ngo 16e4f9
     }
Than Ngo 16e4f9
     else // just goto the next element in the list
Than Ngo 16e4f9
     {
Than Ngo 16e4f9
-      if (!result.isEmpty()) results.push_back(result.data());
Than Ngo 16e4f9
+      if (!result.isEmpty()) results.push_back(result.str());
Than Ngo 16e4f9
     }
Than Ngo 16e4f9
   }
Than Ngo 16e4f9
   sl = results;
Than Ngo 16e4f9
@@ -1409,7 +1409,7 @@ static void cleanUpPaths(StringVector &str)
Than Ngo 16e4f9
       QFileInfo fi(path.c_str());
Than Ngo 16e4f9
       if (fi.exists() && fi.isDir())
Than Ngo 16e4f9
       {
Than Ngo 16e4f9
-        path = fi.absFilePath().utf8().data();
Than Ngo 16e4f9
+        path = fi.absFilePath().utf8().str();
Than Ngo 16e4f9
         if (path[path.size()-1]!='/') path+='/';
Than Ngo 16e4f9
       }
Than Ngo 16e4f9
     }
Than Ngo 16e4f9
@@ -1545,7 +1545,7 @@ void Config::checkAndCorrect()
Than Ngo 16e4f9
     QString p = QDir::currentDirPath();
Than Ngo 16e4f9
     if (p.at(p.length()-1)!='/')
Than Ngo 16e4f9
         p.append('/');
Than Ngo 16e4f9
-    stripFromPath.push_back(p.utf8().data());
Than Ngo 16e4f9
+    stripFromPath.push_back(p.utf8().str());
Than Ngo 16e4f9
   }
Than Ngo 16e4f9
   else
Than Ngo 16e4f9
   {
Than Ngo 16e4f9
@@ -1882,7 +1882,7 @@ void Config::checkAndCorrect()
Than Ngo 16e4f9
   if (inputSources.empty())
Than Ngo 16e4f9
   {
Than Ngo 16e4f9
     // use current dir as the default
Than Ngo 16e4f9
-    inputSources.push_back(QDir::currentDirPath().utf8().data());
Than Ngo 16e4f9
+    inputSources.push_back(QDir::currentDirPath().utf8().str());
Than Ngo 16e4f9
   }
Than Ngo 16e4f9
   else
Than Ngo 16e4f9
   {