Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-21025

QxmlSimpleReader can't handle external entity reference file over 1k

    XMLWordPrintable

Details

    Description

      If a xml file uses external entity reference to a file, the QXmlSimpleReader uses 1k buffer to read the content. This brings a sudden stop of parsing if the file size is over 1k.
      The problematic code is in qxml.cpp:

                                      if (ret) {
                                          QString xmlRefString = ret->data(); //this function returns maximum 1k data
                                          delete ret;
                                          if (!stripTextDecl(xmlRefString)) {
                                              reportParseError(QLatin1String(XMLERR_ERRORINTEXTDECL));
                                              return false;
                                          }
                                          if (!insertXmlRef(xmlRefString, reference, false))
                                              return false;
                                          skipIt = false;
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              zhongle honglei zhang
              zhongle honglei zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes