Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1657

Improved XMLChar1_x::isValidName(...) function for null-terminated strings...

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0
    • Utilities
    • None
    • Win, Linux, Unix, etc

    Description

      For all function calls of XMLChar1_x::isValidName(const XMLCh* const toCheck, const unsigned int count) a null-terminated string is used. In most cases we calculate the length of the string and pass it as second parameter. Since we have to check all characters anyways and know the string ends with a null, there is no reason to calculate and pass the length to the function.

      I extended the XMLChar1_x class with two functions which takes only null-terminated strings without length information and removed the length from all existing old functions calls.

      ~Christian

      Attachments

        1. isValidName.patch
          6 kB
          Christian Will

        Activity

          People

            cargilld@ca.ibm.com cargilld
            nukleon Christian Will
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: