Don't return pointer out of scope.

Fixes CID #1197126
Limit output.  Fixes CID #1197124