properly zero-terminate input buffer -  Bug #605

http://bugs.mariadb.com/show_bug.cgi?id=605
Merge pull request #64 from hholzgra/hartmut-bug-605

properly zero-terminate input buffer -  Bug #605