Limit the buffer size.