[#4] check buffer size