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

Use of uninitialized memory in the functions WriteFile and ReadFile

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • RosDlls

    Description

      ReactOS: 0.4.16

      Module: Kernel32

      Patch included.

      test.cpp - Test program demonstrating the issue

      The issue may cause Total Commander to crash in debug build, also it's confirmed to block ReactOS building on itself, as was reported in CORE-20612.

      The problem stems from the use of uninitialized memory.
      In the file dll\win32\kernel32\client\file\rw.c, specifically in the functions WriteFile and ReadFile, the Iosb.Information field is used without initialization:

                *lpNumberOfBytesWritten = Iosb.Information; // BUG1
                *lpNumberOfBytesRead = Iosb.Information; // BUG2
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Aliaksandr Aliaksandr
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: