Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-13597

[ATL] CAtlList copy constructor issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 0.4.7
    • Component/s: CRT
    • Labels:
      None

      Description

      CAtlList copies itself incorrectly - the m_Next at the end of list (and m_Prev) gets corrupted and points to nonexisting m_FreeNode.
      See the screeshots in the attachment.

      How to reproduce:

      ATL::CAtlList<T> GetList()
      {
          ATL::CAtlList<T> List;
          // fill it
          return List;
      }
       
      VOID ProcessList(const ATL::CAtlList<T>& List)
      {
          // process the list
      }
       
      // call like this
      ...
      ProcessList(GetList());
      ...
       
      // or like this
      ...
      ATL::CAtlList<T> list = GetList();
      ProcessList(list);
      ...
       

       

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              hbelusca hbelusca
              Reporter:
              sanchaez sanchaez
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: