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

Small bug in byte-alignment for long field names in Smile, symbol table reuse #235

Closed
cowtowncoder opened this issue Jan 5, 2021 · 1 comment
Labels
Milestone

Comments

@cowtowncoder
Copy link
Member

As per lgtm.com's warning, it looks like byte-padding in method

    private final String _decodeLongUnicodeName(int[] quads, int byteLen, int quadLen) {

is slightly wrong, as it assumes lastQuadBytes value to be between [1, 4], but it is actually [0, 3].
Looks like this might potentially lead to collision between 2 long strings with lengths divisible by 4, where only some of last 4 characters differ. Coming up with a test may be challenging.

@cowtowncoder
Copy link
Member Author

Looking at this, I do NOT think this actually resulted in actual bug, only (very) slightly suboptimal handling. Will do it nevertheless, but no reproduction since there isn't actual issue as far as I can reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant