Fixed stability issues, mostly NULL value insecure code.
Merge branch 'master' of https://github.com/intosoft/tirt