Limit buffer size