Skip to content

fix potential byte overflow exceptions #18

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

Merged
merged 1 commit into from
May 11, 2019
Merged

fix potential byte overflow exceptions #18

merged 1 commit into from
May 11, 2019

Conversation

jerryneedell
Copy link
Contributor

@jerryneedell jerryneedell commented May 11, 2019

This appears to fix #17
I intentionally only added "& 0xff" where values are manipulated -- arguments passed into functions are assumed to be <= 0xff and need not be tested. If they are not, it is a legitimate error (e.g. crc, cmd, token) Is that correct od should we wrap everything in () & 0xff?

Tested on PyPortal and feather_nrf52840_express (with tot featherwing) -- ran slideshow from SD Card.

@ladyada
Copy link
Member

ladyada commented May 11, 2019

FYI, didnt test but looks good to me

@jerryneedell jerryneedell requested a review from dhalbert May 11, 2019 17:12
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks perfect; I was going to do exactly the same thing.

@dhalbert dhalbert merged commit cb8f61b into adafruit:master May 11, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

byte assignments use values larger than bytes
4 participants