Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3791

Delphi pipe client may fail even in a non-error condition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0
    • Delphi - Library
    • None
    • Patch Available
    • Patch

    Description

      In TPipeStreamBase.ReadDirect(), the code performs a peek on the pipe. If no data is available (bytes = 0), GetLastError is still checked, even though Microsoft documentation clearly states that not all functions set the last error code to 0 on success (https://msdn.microsoft.com/en-us/library/windows/desktop/ms679360(v=vs.85).aspx). Furthermore, because PeekNamedPipe only mentions that GetLastError should be called on failure, the logic of the if test must be changed.

      Attachments

        Activity

          People

            KyleJ61782 Kyle Johnson
            KyleJ61782 Kyle Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: