Clean up ReadHeader harness
void harness() {
IotHttpsResponseHandle_t respHandle = allocate_IotResponseHandle();
- size_t pName_len;
- __CPROVER_assume(pName_len >= 0 &&
- pName_len <= IOT_HTTPS_MAX_HOST_NAME_LENGTH);
- char *pName = safeMalloc(pName_len);
- uint32_t len;
- __CPROVER_assume(len >= 0 && len <= MAX_ACCEPTED_SIZE);
- char *pValue = safeMalloc(len);
+ size_t nameLen;
+ size_t valueLen;
+ char *pName = safeMalloc(nameLen);
+ char *pValue = safeMalloc(valueLen);
if (respHandle) {
- /* We need to bound respHandle->readHeaderValueLength in order to
- * terminate strncpy */
- __CPROVER_assume(respHandle->readHeaderValueLength >= 0 &&
- respHandle->readHeaderValueLength <= MAX_ACCEPTED_SIZE + 1);
__CPROVER_assume(is_valid_IotResponseHandle(respHandle));
}
- IotHttpsClient_ReadHeader(respHandle, pName, pName_len, pValue, len);
+ IotHttpsClient_ReadHeader(respHandle, pName, nameLen, pValue, valueLen);
}
