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

ACPI hardware IDs not properly null-terminated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 0.4.2
    • Component/s: Drivers
    • Labels:
      None
    • Module:
    • Sprint:
      May 2016

      Description

      ACPI has the following code snippet:

      		index = 0;
      		index += swprintf(&temp[index],
      							L"ACPI\\%hs",
      							Device->pnp.hardware_id);
      		index++;
       
      		index += swprintf(&temp[index],
      							L"*%hs",
      							Device->pnp.hardware_id);
      		index++;
      		temp[++index] = UNICODE_NULL;

      Using ++index in the last line moves the null one further than intended, and temp[index-1] will be left uninitialized

        Attachments

          Activity

            People

            • Assignee:
              ThFabba ThFabba
              Reporter:
              ThFabba ThFabba
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: