Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-122

Rolling file appender goes into infinite loop trying to convert backslash to forward slash in file paths

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 0.10.0
    • 0.10.0
    • Appender
    • None
    • Window XP Professional, Microsoft Visual C++ 6.0, DOM configuration file

    Description

      Application goes into infinite loop when attempting to roll over a file when the configuration entry for the logging file contains backslash characters.

      In file.cpp line83 function convertBackSlashes uses find function
      ......
      while(pos != std::string::npos)
      {
      mod[pos] = '/';
      pos = src.find('
      ');
      }
      ...

      This will loop on the first backslash.

      Should be:
      ......
      while(pos != std::string::npos)
      {
      mod[pos] = '/';
      pos = src.find('
      ',pos);
      }
      ...

      This will continue the search from the previous location rather than starting from the beginning again.

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            charris Chris Harris
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: