change the buf length