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

handle NUL/corrupt String in jspb.BinaryDecoder.prototype.readString #190

Commits on Feb 11, 2024

  1. jspb.BinaryDecoder.prototype.readString handles UTF-8, existing beha…

    …vior assumes char 128-191 is a sync issue and ignores it,
    
        but this function should also never encounter a zero/NUL byte since it's decoding a String. This can occur with sync issues or
        from corrupt/malformed/malign data being in the Binary block, by aborting and continuing at the expected end cursor point we
        probably skip some bad text input, by continuing to read we are more likely to read junk and continue to decode and move the
        cursor past the end of the text.
    
        PASSES TEST:
        151 specs, 0 failures
        Finished in 1.611 seconds
        Randomized with seed 68142 (jasmine --random=true --seed=68142)
    
        [22:47:53] Finished 'test_commonjs' after 1.87 s
        [22:47:53] Finished 'test' after 24 s
    hwygithub committed Feb 11, 2024
    Configuration menu
    Copy the full SHA
    536c0b4 View commit details
    Browse the repository at this point in the history