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

Fix Base64OutStream portability issue #4668

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

trevor-m
Copy link
Contributor

@trevor-m trevor-m commented Jan 9, 2020

Fixes #4660
On ARM, char is unsigned by default while on x86 it is signed by default. On ARM, this causes the logic in Base64OutStream::Finish to incorrectly add a char with value of 255 to the end of every b64 string. Fix is to use int for the endchar. Alternatively we could explicitly use signed char.
https://www.linuxtopia.org/online_books/an_introduction_to_gcc/gccintro_71.html

@tqchen tqchen merged commit 619c63c into apache:master Jan 9, 2020
@tqchen
Copy link
Member

tqchen commented Jan 9, 2020

Thanks @trevor-m

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

Successfully merging this pull request may close these issues.

Unicode, Base64 errors using SaveJSON, LoadJSON on constants with aarch64 only (works on x86_64)
2 participants