Skip to content

Fixed off-by-one bug in setFirmwareNameAndVersion() where we were writin... #184

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
Feb 7, 2015
Merged

Conversation

EmbeddedMan
Copy link
Contributor

...g a zero terminator past the end of the block we'd gotten from malloc().

Since the next line writes a zero to the firmwareVersionCount byte of firmwareVersionVector, we need to ask for one more than that bytes from malloc() so that we have enough space. Without the "+1", you write past the end of the array, which doesn't play nice with some malloc implementations (PIC32/chipKIT being one).

…ting a zero terminator past the end of the block we'd gotten from malloc().
soundanalogous added a commit that referenced this pull request Feb 7, 2015
Fixed off-by-one bug in setFirmwareNameAndVersion() where we were writin...
@soundanalogous soundanalogous merged commit 50f537a into firmata:master Feb 7, 2015
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.

2 participants