mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
DynamicDNS: Fix a crash when increasing the number of services
This commit is contained in:
parent
fdc76219da
commit
942b7251dd
1 changed files with 4 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ static void update_supported_services(void)
|
|||
{
|
||||
struct uci_section *s = NULL;
|
||||
char *service_name = NULL;
|
||||
char supported_services[1024] = {0};
|
||||
char supported_services[2048] = {0};
|
||||
unsigned pos = 0;
|
||||
|
||||
supported_services[0] = 0;
|
||||
|
|
@ -49,6 +49,9 @@ static void update_supported_services(void)
|
|||
uci_path_foreach_sections(bbfdm, "dmmap_ddns", "server", s) {
|
||||
dmuci_get_value_by_section_string(s, "service_name", &service_name);
|
||||
|
||||
if ((sizeof(supported_services) - pos) < DM_STRLEN(service_name))
|
||||
break;
|
||||
|
||||
pos += snprintf(&supported_services[pos], sizeof(supported_services) - pos, "%s,", service_name);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue