Fix for Coverity CID71769 - Dereference null return value
Fix for Coverity CID71741 - Dereference null return value
Fix for Coverity CID71754 - Uninitialized scalar variable
Fix for Coverity CID71731 - Buffer not null terminated
Fix for Coverity CID71727 - Unchecked return value from library
Fix for Coverity CID71725 - Unchecked return value from library
Fix for Coverity CID71737 - Unchecked return value from library
Merge pull request #155 from jbmaillet/coverity_fixes

Coverity fixes