check right buffer size