Fix buffer overflow in adiv5_component_probe()
This commit is contained in:
parent
90df8172ca
commit
5c805c7d35
@ -263,7 +263,7 @@ static bool adiv5_component_probe(ADIv5_AP_t *ap, uint32_t addr, int recursion,
|
|||||||
uint32_t cidr = 0;
|
uint32_t cidr = 0;
|
||||||
bool res = false;
|
bool res = false;
|
||||||
#if defined(ENABLE_DEBUG) && defined(PLATFORM_HAS_DEBUG)
|
#if defined(ENABLE_DEBUG) && defined(PLATFORM_HAS_DEBUG)
|
||||||
char indent[recursion];
|
char indent[recursion + 1];
|
||||||
|
|
||||||
for(int i = 0; i < recursion; i++) indent[i] = ' ';
|
for(int i = 0; i < recursion; i++) indent[i] = ' ';
|
||||||
indent[recursion] = 0;
|
indent[recursion] = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user