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

String copying boundary checking #3

Merged
merged 5 commits into from
May 29, 2014

Conversation

rgagnon24
Copy link
Contributor

Changed most all sprintf() to snprintf() using target char[] for the size_t value of snprintf(). Added zero byte to end of every string after snprintf() as snprintf() may not properly terminate a string with null byte per its documentation.

Shortened some strings to sensible sizes as needed. IE: some do not need 255 or 1024 bytes in order to store 12-20 bytes.

@voipmonitor voipmonitor merged commit 08823fd into voipmonitor:develop May 29, 2014
@voipmonitor
Copy link
Owner

looks good but about - ENGINE=InnoDB DEFAULT CHARSET=latin1 - we do not
know what would happen to leave that to default charset. At least all chars
will take 2x space and char limits will be /2

2014-05-28 21:16 GMT+02:00 Rob Gagnon notifications@github.com:

Changed most all sprintf() to snprintf() using target char[] for the
size_t value of snprintf(). Added zero byte to end of every string after
snprintf() as snprintf() may not properly terminate a string with null byte
per its documentation.

Shortened some strings to sensible sizes as needed. IE: some do not need

255 or 1024 bytes in order to store 12-20 bytes.

You can merge this Pull Request by running

git pull https://github.com/rgagnon24/sniffer develop

Or view, comment on, or merge it at:

#3
Commit Summary

  • Add boundary checking for string manipulation functions
  • More snprintf() for buffer-overrun protection

File Changes

Patch Links:


Reply to this email directly or view it on GitHubhttps://github.com//pull/3
.

Best regards
Martin Vit

@voipmonitor
Copy link
Owner

I have merged it but reverted the mysql changes

2014-05-28 21:16 GMT+02:00 Rob Gagnon notifications@github.com:

Changed most all sprintf() to snprintf() using target char[] for the
size_t value of snprintf(). Added zero byte to end of every string after
snprintf() as snprintf() may not properly terminate a string with null byte
per its documentation.

Shortened some strings to sensible sizes as needed. IE: some do not need

255 or 1024 bytes in order to store 12-20 bytes.

You can merge this Pull Request by running

git pull https://github.com/rgagnon24/sniffer develop

Or view, comment on, or merge it at:

#3
Commit Summary

  • Add boundary checking for string manipulation functions
  • More snprintf() for buffer-overrun protection

File Changes

Patch Links:


Reply to this email directly or view it on GitHubhttps://github.com//pull/3
.

Best regards
Martin Vit

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