initialize output length variable
use calloc to ensure initialization
Merge pull request #1 from bignerdranch/analyzerWarnings

fixes analyzer warnings