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

PATCH: Fix create_stream()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • Wine

    Description

      The current implementation of create_stream has several issues:
      1) It lets to stream contents of an INVALID_FILE_SIZE file. In such case we would end derreferencing a NULL pointer
      2) If the file has a valid file size but we're unable to read it, we would end derreferencing a freed pointer.
      3) hresult "hr" variable is not properly set in INVALID_FILE_SIZE case.

      The patch fixes this issues, spotted by CID 1363720 , and also cleans the logic: Return as soon as an error is detected and reducing the nested ifs making the code slightly more readable.

      Attachments

        Activity

          People

            bug zilla Bug Zilla
            vicmarcal vicmarcal
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: