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

prevent memcpy with nullptr #63

Merged
merged 1 commit into from
Dec 12, 2019

Conversation

geoffviola
Copy link
Contributor

I noticed that sometimes serializeArray is called with 0 elements. A vector with a capacity of 0 can have data pointing to nullptr. This means that a memcpy call can occur with the first argument as nullptr. According to the C standard, this is undefined behavior.

@richiware
Copy link
Member

Build status:

  • Linux Build Status
  • Windows Build Status

@richiware richiware merged commit b1fcd89 into eProsima:master Dec 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.

2 participants