[tests] fix buffer overflow

 introduced by 629f13945312f3ebfac9b724cf69cdc04cbdb08c (#242) (thanks @jrossi for pointing out)