ReactOS Test Suite
  1. ReactOS Test Suite
  2. ROSTESTS-205

Fix the number of bytes in rpcrt4:server winetest

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Right now to calculate the proper number of bytes to be allocated, we are using a FielOffset with ca[5], however ca has just 5 elements, not 6.
      Fixing it with FIELD_OFFSET(cs_t, ca[4])+ sizeof(int)) since ca is an int.

      1. server.c.patch
        0.5 kB
        victor martinez calvo

        Activity

        Hide
        Thomas Faber
        added a comment -

        ca is a variable-length array, it doesn't have 4 elements, it has 0 or 1 in the definition, and an arbitrary number when allocating (which is exactly what's happening here).

        Show
        Thomas Faber
        added a comment - ca is a variable-length array, it doesn't have 4 elements, it has 0 or 1 in the definition, and an arbitrary number when allocating (which is exactly what's happening here).
        Hide
        victor martinez calvo
        added a comment -

        Right, dunno how I thought the cs_t structure was a 5 elements one.
        The cs_t definition is a ca[]; one. Correct. Mygosh.

        Show
        victor martinez calvo
        added a comment - Right, dunno how I thought the cs_t structure was a 5 elements one. The cs_t definition is a ca[]; one. Correct. Mygosh.

          People

          • Assignee:
            Bug Zilla
            Reporter:
            victor martinez calvo
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: