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

Add checks and specs for writing to inline array and char array fields #756

Merged
merged 3 commits into from Apr 9, 2020

Commits on Apr 2, 2020

  1. Add bounds checks for writing to an inline char[]

    * Raise IndexError if the written String is longer than the char[].
    * Don't write a final \0 if we write as many characters as the char[] length.
    eregon committed Apr 2, 2020
    Copy the full SHA
    5ed3af1 View commit details
    Browse the repository at this point in the history
  2. Add FFI specs for writing to array and char array fields

    * Note that the last 2 specs used to fail before the previous commit.
    eregon committed Apr 2, 2020
    Copy the full SHA
    57399c5 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2020

  1. Adjust test vectors to be a bit more meaningful

    - Verify that the string length is counted in bytes (not characters)
    - Use negative values for :before and :after to notice overflows better
    - Specify explicit how zero char is handled
    larskanis committed Apr 8, 2020
    Copy the full SHA
    e12d18e View commit details
    Browse the repository at this point in the history