Verify buffer length