Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NRBF] More bug fixes #107682

Merged
merged 15 commits into from
Sep 12, 2024
Merged

[NRBF] More bug fixes #107682

merged 15 commits into from
Sep 12, 2024

Commits on Sep 11, 2024

  1. be explicit, always throw InvalidOperationException for values not ex…

    …pected by switch statements and if/else blocks
    adamsitnik committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    5543848 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    48283cd View commit details
    Browse the repository at this point in the history
  3. reject all arrays with length > Arraym.MaxLength (not just uint.MaxVa…

    …lue).
    
    This is something I agreed on with Jeremy Kuhne a while ago, but missed it.
    adamsitnik committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    24166f5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bbaf39b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8bb78e8 View commit details
    Browse the repository at this point in the history
  6. avoid int32 overflow

    adamsitnik committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    af07e22 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    714b226 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ac40734 View commit details
    Browse the repository at this point in the history
  9. SerializationRecordId does not override ToString, we need to provide …

    …the value of the Id in explicit way
    adamsitnik committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    34f96bb View commit details
    Browse the repository at this point in the history
  10. provide DebuggerDisplay for SerializationRecordId, fix it for ArrayIn…

    …fo (Length property is longer present in this type)
    adamsitnik committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    9c8b0c6 View commit details
    Browse the repository at this point in the history
  11. throw SerializationException when PrimitiveType.String is provided in…

    … a place where it's not valid
    adamsitnik committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    2ff65c7 View commit details
    Browse the repository at this point in the history
  12. revert a change that is going to get a fix in separate PR as it's not…

    … complete, but increases the amount of code that needs to be reviewed
    adamsitnik committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    fdd59fc View commit details
    Browse the repository at this point in the history
  13. fuzzer: throw SerializationException when PrimitiveType.String is pro…

    …vided in a place where it's not valid
    adamsitnik committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    6fca7f3 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4ff4f82 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. Remove "Null" and "String" from the internal enum PrimitiveType as it…

    … is always illegal to parse it and every switch needed to take this into account.
    
    Now we reject those values at parse time and don't need to handle them later.
    
    - In case of BinaryArray (NRBF 2.4.3.1):
     "If the BinaryTypeEnum value is Primitive, the PrimitiveTypeEnumeration
     value in AdditionalTypeInfo MUST NOT be Null (17) or String (18)."
    - In case of MemberPrimitiveTyped (NRBF 2.5.1):
     "PrimitiveTypeEnum (1 byte): A PrimitiveTypeEnumeration
     value that specifies the Primitive Type of data that is being transmitted.
     This field MUST NOT contain a value of 17 (Null) or 18 (String)."
    - In case of ArraySinglePrimitive (NRBF 2.4.3.3):
     "A PrimitiveTypeEnumeration value that identifies the Primitive Type
     of the items of the Array. The value MUST NOT be 17 (Null) or 18 (String)."
    - In case of MemberTypeInfo (NRBF 2.3.1.2):
     "When the BinaryTypeEnum value is Primitive, the PrimitiveTypeEnumeration
     value in AdditionalInfo MUST NOT be Null (17) or String (18)."
    adamsitnik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    3aa1656 View commit details
    Browse the repository at this point in the history