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

iomgr: bad if statement in IopCreateArcNamesCd()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 0.4.0
    • NTCore
    • None
    • ReactOS

    Description

      Hello.

      The problem is in the following piece of code (ntoskrnl/io/iomgr/arcname.c, function IopCreateArcNamesCd()):

          /* Start browsing Cds */
          for (DiskNumber = 0, EnabledDisks = 0; DiskNumber < CdRomCount; DiskNumber++)
          {
              /* Check if we have an enabled disk */
              if (SymbolicLinkList && *SymbolicLinkList != UNICODE_NULL)
              {
                  /* Create its device name using first symbolic link */
                  RtlInitUnicodeString(&DeviceStringW, lSymbolicLinkList);
                  /* Then, update symbolic links list */
                  lSymbolicLinkList += wcslen(lSymbolicLinkList) + (sizeof(UNICODE_NULL) / sizeof(WCHAR));
       

      This code was designed to loop through the list of enabled CD drives, but it doesn't check the end of symbolic link list condition correctly. The SymbolicLinkList variable in the if statement should be replaced with the lSymbolicLinkList variable (like in the IopCreateArcNamesDisk() from the same source code file and in the IopCreateArcNamesCd() from WRK).

      Attachments

        Activity

          People

            Heis Spiter Pierre Schweitzer
            msuhanov msuhanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: