mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12508 from evedon/ed-mprintf-stack-overflow
Fix minimal-printf stack overflowpull/12463/head
commit
d94965f38d
|
@ -220,12 +220,12 @@ static void mbed_minimal_formatted_string_hexadecimal(char *buffer, size_t lengt
|
|||
unsigned int nibble_one = (output >> 4);
|
||||
unsigned int nibble_two = (output & 0x0F);
|
||||
|
||||
const char int2hex_lower[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
|
||||
};
|
||||
const char int2hex_upper[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
|
||||
};
|
||||
static const char int2hex_lower[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
|
||||
};
|
||||
static const char int2hex_upper[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
|
||||
};
|
||||
const char *int2hex = upper ? int2hex_upper : int2hex_lower;
|
||||
|
||||
if (print_leading_zero || nibble_one != 0) {
|
||||
|
|
Loading…
Reference in New Issue