8000 fixing memory leaks and other issues reported by Coverity Prevent. by vchandla · Pull Request #6 · jpommerening/midikit · GitHub
[go: up one dir, main page]

Skip to content

fixing memory leaks and other issues reported by Coverity Prevent. #6

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 7 commits into from
Jan 3, 2014

Conversation

vchandla
Copy link
Contributor
@vchandla vchandla commented Jan 3, 2014

applemidi.c
1 Initialize sockaddr_in variable to clear sin_zero field to avoid undifined behavior.
2 Socket system call's return is validated before the call of bind.

osc.c
1 Initialize sockaddr_in variable to clear sin_zero field to avoid undifined behavior.
1 Socket system call's return is validated.
1 Fix of memory allocated ( for size 52 bytes) in case of error scenario not deleted.

clock.c
1 fix for integer overflow issue.

device.c
1 Fix for Out-of-bounds write error(Overrunning array)

event.c
1 Fix of memory allocated ( for size 32 bytes) in case of error scenario not deleted.

port.c
2 Fix of dymaic sized allocated memory and for 32 bytes memory not deleted in error scenario.

event is allocated memory which is not freed if malloc for buffer fails.
free port->name in function MIDIPortCreate before returning NULL if port->ports is NULL.
Fix for Out-of-bounds write error(Overrunning array)
fix for integer overflow issue.
fix for integer overflow issue.
Initialize sockaddr_in variable to clear sin_zero field to avoid undifined behavior.
Socket system call's return is validated.
Fix of memory allocated ( for size 52 bytes) in case of error scenario not deleted.
Initialize sockaddr_in variable to clear sin_zero field to avoid undifined behavior.
Socket system call's return is validated before the call of bind.
@jpommerening
Copy link
Owner

This looks very good. Thank you a lot, Vishal!

jpommerening added a commit that referenced this pull request Jan 3, 2014
fixing memory leaks and other issues reported by Coverity Prevent.

* out-of-bounds write errors
* unchecked socket() errors
* memset() on sockaddr_in
* integer overflows
@jpommerening jpommerening merged commit 9b275ce into jpommerening:master Jan 3, 2014
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
0