Update malloc checks on submodules (#2573)
* Update submodules * fix rand() * update cutil * update uTPM * update umqtt * update cutil
This commit is contained in:
Родитель
3b03c729e9
Коммит
8a0c0dd079
|
@ -1 +1 @@
|
|||
Subproject commit 1129147c38ac02ad974c4c701a1e01b2141b9fe2
|
||||
Subproject commit 3d14f91c58ee805ca4075d688fba1d95f496d16f
|
|
@ -1 +1 @@
|
|||
Subproject commit 7ae637caadedf80fee074815053f70281f330ce6
|
||||
Subproject commit a538340f976b8f40542fece8c6c9a9a8461e0974
|
|
@ -41,7 +41,7 @@
|
|||
#include "azure_c_shared_utility/shared_util_options.h"
|
||||
#include "azure_c_shared_utility/xlogging.h"
|
||||
#include "azure_c_shared_utility/lock.h"
|
||||
#include "azure_c_shared_utility/gb_rand.h"
|
||||
#include "azure_c_shared_utility/random.h"
|
||||
|
||||
#ifdef SET_TRUSTED_CERT_IN_SAMPLES
|
||||
#include "certs.h"
|
||||
|
@ -334,7 +334,7 @@ static void GenerateUniqueId(const char* prefix, size_t prefix_len, char* buffer
|
|||
buffer[prefix_len - 1] = '.';
|
||||
for (int i = 0; i < (MSG_UNIQUE_ID_STAMP_LEN - 1); i++)
|
||||
{
|
||||
buffer[prefix_len + i] = (unsigned char)((gb_rand() % 10) + '0');
|
||||
buffer[prefix_len + i] = (unsigned char)((RANDOM_generate() % 10) + '0');
|
||||
}
|
||||
buffer[prefix_len + MSG_UNIQUE_ID_STAMP_LEN - 1] = '\0';
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit de4ffe4d1554ac1060253ea6975bfe3a04abd7ce
|
||||
Subproject commit a2f8e1c97ed5efd8e4f90616623b67be369e3ae1
|
|
@ -7,7 +7,7 @@
|
|||
#include <time.h>
|
||||
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/gb_rand.h"
|
||||
#include "azure_c_shared_utility/random.h"
|
||||
#include "azure_c_shared_utility/xlogging.h"
|
||||
#include "azure_c_shared_utility/uniqueid.h"
|
||||
|
||||
|
@ -415,7 +415,7 @@ static void generate_subject_name(void)
|
|||
unsigned char rand_buff[RANDOM_BUFFER_LENGTH];
|
||||
for (size_t index = 0; index < RANDOM_BUFFER_LENGTH; index++)
|
||||
{
|
||||
rand_buff[index] = (unsigned char)gb_rand();
|
||||
rand_buff[index] = (unsigned char)RANDOM_generate();
|
||||
}
|
||||
|
||||
strcpy(g_device_name, DEVICE_PREFIX);
|
||||
|
@ -447,13 +447,13 @@ static void generate_keys(void)
|
|||
srand((unsigned int)time(NULL));
|
||||
for (size_t index = 0; index < DICE_UDS_LENGTH; index++)
|
||||
{
|
||||
g_uds_seed[index] = (unsigned char)gb_rand();
|
||||
g_uds_seed[index] = (unsigned char)RANDOM_generate();
|
||||
}
|
||||
for (size_t index = 0; index < RIOT_DIGEST_LENGTH; index++)
|
||||
{
|
||||
firmware_id[index] = (unsigned char)gb_rand();
|
||||
g_CDI[index] = (unsigned char)gb_rand();
|
||||
random_digest[index] = (unsigned char)gb_rand();
|
||||
firmware_id[index] = (unsigned char)RANDOM_generate();
|
||||
g_CDI[index] = (unsigned char)RANDOM_generate();
|
||||
random_digest[index] = (unsigned char)RANDOM_generate();
|
||||
}
|
||||
DiceSHA256(g_uds_seed, DICE_UDS_LENGTH, g_digest);
|
||||
DiceSHA256_2(g_digest, RIOT_DIGEST_LENGTH, random_digest, RIOT_DIGEST_LENGTH, g_CDI);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <time.h>
|
||||
|
||||
#include "azure_c_shared_utility/gballoc.h"
|
||||
#include "azure_c_shared_utility/gb_rand.h"
|
||||
#include "azure_c_shared_utility/xlogging.h"
|
||||
#include "azure_c_shared_utility/uniqueid.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "azure_c_shared_utility/httpapiexsas.h"
|
||||
#include "azure_c_shared_utility/uniqueid.h"
|
||||
#include "azure_c_shared_utility/threadapi.h"
|
||||
#include "azure_c_shared_utility/gb_rand.h"
|
||||
#include "azure_c_shared_utility/random.h"
|
||||
|
||||
#include "iothub_service_client_auth.h"
|
||||
#include "iothub_registrymanager.h"
|
||||
|
@ -292,7 +292,7 @@ static IOTHUB_REGISTRYMANAGER_RESULT createTestDeviceWithRetry(IOTHUB_REGISTRYMA
|
|||
int creationAttempts = 0;
|
||||
bool doesDeviceExist = false;
|
||||
|
||||
ThreadAPI_Sleep(TEST_SLEEP_THROTTLE_MSEC + gb_rand() % 10); // prevent Too Many Requests (429) error from service
|
||||
ThreadAPI_Sleep(TEST_SLEEP_THROTTLE_MSEC + RANDOM_generate() % 10); // prevent Too Many Requests (429) error from service
|
||||
while (true)
|
||||
{
|
||||
if (doesDeviceExist == false)
|
||||
|
@ -330,7 +330,7 @@ static IOTHUB_REGISTRYMANAGER_RESULT createTestDeviceWithRetry(IOTHUB_REGISTRYMA
|
|||
}
|
||||
|
||||
LogError("Creating device %s failed with error %s (%d). Sleeping %d milliseconds", deviceCreateInfo->deviceId, MU_ENUM_TO_STRING(IOTHUB_REGISTRYMANAGER_RESULT, result), result, TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC);
|
||||
ThreadAPI_Sleep(TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC + gb_rand() % 15); // sleep with jitter
|
||||
ThreadAPI_Sleep(TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC + RANDOM_generate() % 15); // sleep with jitter
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -343,7 +343,7 @@ static IOTHUB_REGISTRYMANAGER_RESULT createTestModuleWithRetry(IOTHUB_REGISTRYMA
|
|||
int creationAttempts = 0;
|
||||
bool doesDeviceExist = false;
|
||||
|
||||
ThreadAPI_Sleep(TEST_SLEEP_THROTTLE_MSEC + gb_rand() % 10); // prevent Too Many Requests (429) error from service
|
||||
ThreadAPI_Sleep(TEST_SLEEP_THROTTLE_MSEC + RANDOM_generate() % 10); // prevent Too Many Requests (429) error from service
|
||||
while (true)
|
||||
{
|
||||
if (doesDeviceExist == false)
|
||||
|
@ -376,7 +376,7 @@ static IOTHUB_REGISTRYMANAGER_RESULT createTestModuleWithRetry(IOTHUB_REGISTRYMA
|
|||
}
|
||||
|
||||
LogError("Creating device/module %s/%s failed with error %d. Sleeping %d milliseconds", moduleCreateInfo->deviceId, moduleCreateInfo->moduleId, result, TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC);
|
||||
ThreadAPI_Sleep(TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC + gb_rand() % 15); // sleep with jitter
|
||||
ThreadAPI_Sleep(TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC + RANDOM_generate() % 15); // sleep with jitter
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -573,7 +573,7 @@ static int updateTestModuleWithRetry(IOTHUB_REGISTRYMANAGER_HANDLE iothub_regist
|
|||
}
|
||||
|
||||
LogError("Updating device/module %s/%s failed with error %d. Sleeping %d milliseconds", deviceToProvision->deviceId, deviceToProvision->moduleId, result, TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC);
|
||||
ThreadAPI_Sleep(TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC + gb_rand() % 15);
|
||||
ThreadAPI_Sleep(TEST_SLEEP_BETWEEN_CREATION_FAILURES_MSEC + RANDOM_generate() % 15);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -861,7 +861,7 @@ void IoTHubAccount_deinit(IOTHUB_ACCOUNT_INFO_HANDLE acctHandle)
|
|||
break;
|
||||
}
|
||||
LogError("IoTHubRegistryManager_DeleteDevice failed (%d) for SAS Based Device \"%s\"\r\n", i, provisioned_device->deviceId);
|
||||
ThreadAPI_Sleep(TEST_SLEEP_BETWEEN_DELETE_FAILURES_MSEC + gb_rand() % 15); // sleep with jitter
|
||||
ThreadAPI_Sleep(TEST_SLEEP_BETWEEN_DELETE_FAILURES_MSEC + RANDOM_generate() % 15); // sleep with jitter
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
uamqp
2
uamqp
|
@ -1 +1 @@
|
|||
Subproject commit 14e2e53b89d7a866378d7216fd70b0e55a2dac1f
|
||||
Subproject commit 2ca42b6e4e098af2d17e487814a91d05f6ae4987
|
2
umqtt
2
umqtt
|
@ -1 +1 @@
|
|||
Subproject commit f781d7457aff728379aed40a29564c9bc7dea412
|
||||
Subproject commit dd6b593b794273bad72d6e94923bcd29902e421b
|
Загрузка…
Ссылка в новой задаче