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

[Fizz Node] Fix null bytes written at text chunk boundaries #26228

Merged
merged 2 commits into from
Feb 24, 2023

Commits on Feb 24, 2023

  1. [Fizz Node] Fix null bytes written at text chunk boundaries

    We encode strings 2048 UTF-8 bytes at a time. If the string we are encoding crosses to the next chunk but the current chunk doesn't fit an integral number of characters, we need to make sure not to send the whole buffer, only the bytes that are actually meaningful.
    
    Fixes facebook#24985. I was able to verify that this fixes the repro shared in the issue (be careful when testing because the null bytes do not show when printed to my terminal, at least). However, I don't see a clear way to add a test for this that will be resilient to small changes in how we encode the markup (since it depends on where specific multibyte characters fall against the 2048-byte boundaries).
    sophiebits committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    a3c6553 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ba8b1d2 View commit details
    Browse the repository at this point in the history