Add a constrain to avoid memory corruption

Check if requested buffer size is smaller than response buffer size