Fix a buffer overflow noticed by gcc-4.6: zero is written into