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

Large writes/reads may cause range check errors in debug mode

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: Delphi - Library
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      The pipes code contains a few casts using the PByteArray pointer type. The underlying array TByteArray is defined as

      type TByteArray = array [0..32767] of Byte;
      

      With range checks enabled, any access to indices > 32767, even correct ones, result in an range check exception. It may be worth noting that the code is otherwise entirely correct (i.e. no buffer overruns). It is really only the type cast that introduces the failing constraint.

        Attachments

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              jensg Jens Geyer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: