Collating a series of patches for Coverity-reported issues in fs2open.
In the interests of facilitating easy, in line discussion of specific parts of the changes, I have provided a pull request on Github here:
https://github.com/scp-fs2open/fs2open.github.com/pull/18I hope this is an example of one of the benefits of moving our source code hosting to Github. Of course, the underlying bugs are the main improvement we are looking for if correctly reported by Coverity and that the patches actually fix the bugs themselves.
For those users without a Github account, I'm happy to also discuss the patches in this thread.
Note that per the comments: Given fs2open is yet to formally move to Github, this pull request WILL NOT actually be merged into master. Instead, following discussion and approval, the patches will be committed to the current fs2open SVN which is periodically merged into master.
I will add further patches to the pull request as required.