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

iomgr: bad if statement in IopCreateArcNamesCd()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 0.4.0
    • Component/s: NTCore
    • Labels:
      None
    • Environment:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: