Fix buffer overflow in adiv5_component_probe()

This commit is contained in:
Ken Healy 2019-10-12 03:34:21 -04:00 committed by UweBonnes
parent 90df8172ca
commit 5c805c7d35
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ static bool adiv5_component_probe(ADIv5_AP_t *ap, uint32_t addr, int recursion,
uint32_t cidr = 0;
bool res = false;
#if defined(ENABLE_DEBUG) && defined(PLATFORM_HAS_DEBUG)
char indent[recursion];
char indent[recursion + 1];
for(int i = 0; i < recursion; i++) indent[i] = ' ';
indent[recursion] = 0;