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

calls to RtlQueryRegistryValues are not null terminated!

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • Setup
    • None

    Description

      On check why my old Laptop did not find any HDD I come over that in base\setup\usetup\partlist.c in EnumerateBiosDiskEntries calls like this are not save:
      swprintf(Name, L"%s\\%lu\\DiskController
      0", ROOT_NAME, AdapterCount);
      Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
      Name,
      &QueryTable[2],
      NULL,
      NULL);

      because QueryTable has only 3 member and the 4th is undefined.
      But the documentation of MS https://msdn.microsoft.com/en-us/library/windows/hardware/ff562046.aspx
      say next element must have some null stuff in it (QueryRoutine and Name null)
      but I guess this check is also not happen in implementation of RtlQueryRegistryValues

      edit: same in base\system\diskpart\partlist.c since source Code is dupplicated

      Attachments

        Activity

          People

            ThFabba ThFabba
            Trivalik Trivalik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: