Fix string null termination and SIGABRT from glibc

According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682388
the string is not null terminated when too much data is read.

This patch fixes the crashes on my system.
1 file changed