bootchart: make sure that every read buffer is null terminated