Skip to content
Snippets Groups Projects
Commit e2476ebb authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix insufficient allocation bug in link_area() introduced in commit 813072cd

This is likely the cause of the areamgr issue that resulted in weird/invalid
node address being added to the area file, reported by Tom Moore (1:135/205).
parent b48a5a84
No related branches found
No related tags found
No related merge requests found
Pipeline #7346 passed
......@@ -1306,7 +1306,7 @@ bool area_is_linked(unsigned area_num, const fidoaddr_t* addr)
void link_area(unsigned area_num, const fidoaddr_t* addr)
{
area_t* area = &cfg.area[area_num];
if((area->link = realloc_or_free(area->link, (sizeof *addr) * (area->links + 1))) == NULL) {
if((area->link = realloc_or_free(area->link, (sizeof addr) * (area->links + 1))) == NULL) {
lprintf(LOG_ERR,"ERROR line %d allocating memory for area "
"#%u links.",__LINE__, area_num + 1);
bail(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment