Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion IDE/iotsafe/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int _write(void *r, uint8_t *text, int len)
{
char *p = (char *)text;
(void)r;
while(*p && (p < (char *)(text + len))) {
while((p < (char *)(text + len)) && *p) {
usart_tx(USART2_BASE, *p);
p++;
}
Expand Down
12 changes: 6 additions & 6 deletions wolfcrypt/src/port/Espressif/esp32_mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,18 +720,18 @@ static int esp_clean_result(MATH_INT_T* Z, int used_padding)
#else
#undef MP_SIZE
#define MP_SIZE 128
dp_length = SP_INT_DIGITS;
dp_length = Z->size;
#endif
/* TODO end */

this_extra = Z->used;
if (this_extra > MP_SIZE) {
ESP_LOGW(TAG, "Warning (Z->used: %d) > (MP_SIZE: %d); adjusting...",
Z->used, MP_SIZE);
this_extra = MP_SIZE;
if (this_extra > dp_length) {
ESP_LOGW(TAG, "Warning (Z->used: %d) > (dp_length: %d); adjusting...",
Z->used, dp_length);
this_extra = dp_length;
}

while (Z->dp[this_extra] > 0 && (this_extra < MP_SIZE)) {
while ((this_extra < dp_length) && (Z->dp[this_extra] > 0)) {
ESP_LOGV(TAG, "Adjust! %d", this_extra);
Z->dp[this_extra] = 0;
this_extra++;
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/Espressif/esp32_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ static int show_macro(char* s, char* not_defined)
#define ESP_SMS_DIS_POS 42

/* save our string (s) into the space-padded message (msg) */
while (s[i] != '\0' && msg[i] != '\0' && (i < MAX_STATUS_NAME_LENGTH)) {
while ((i < MAX_STATUS_NAME_LENGTH) && s[i] != '\0' && msg[i] != '\0') {
msg[i] = s[i];
i++;
}
Expand Down
Loading