Tidy up name buffer use in report_addresses().

Buffer may need to be twice MAXDNAME is escaping is
enabled in extract_name. The name may include weird characters.
This commit is contained in:
Simon Kelley
2021-06-21 15:05:28 +01:00
parent 38179500f8
commit 25ff956c7d
2 changed files with 24 additions and 5 deletions

View File

@@ -135,6 +135,13 @@ int main (int argc, char **argv)
}
#endif
#if defined(HAVE_CONNTRACK) && defined(HAVE_UBUS)
/* CONNTRACK UBUS code uses this buffer, so if not allocated above,
we need to allocate it here. */
if (option_bool(OPT_CMARK_ALST_EN) && !daemon->workspacename)
daemon->workspacename = safe_malloc(MAXDNAME);
#endif
#ifdef HAVE_DHCP
if (!daemon->lease_file)
{