提交 5f6db1db authored 作者: Nathan Neulinger's avatar Nathan Neulinger

mod_skinny: roll back, these are not expected to be null terminated, they are fixed length

上级 84bc50e4
...@@ -2023,7 +2023,7 @@ switch_status_t skinny_profile_set(skinny_profile_t *profile, const char *var, c ...@@ -2023,7 +2023,7 @@ switch_status_t skinny_profile_set(skinny_profile_t *profile, const char *var, c
} else if (!strcasecmp(var, "digit-timeout")) { } else if (!strcasecmp(var, "digit-timeout")) {
profile->digit_timeout = atoi(val); profile->digit_timeout = atoi(val);
} else if (!strcasecmp(var, "date-format")) { } else if (!strcasecmp(var, "date-format")) {
switch_copy_string(profile->date_format, val, 6); memcpy(profile->date_format, val, 6);
} else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) { } else if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
profile->odbc_dsn = switch_core_strdup(profile->pool, val); profile->odbc_dsn = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "debug")) { } else if (!strcasecmp(var, "debug")) {
...@@ -2244,7 +2244,7 @@ static switch_status_t load_skinny_config(void) ...@@ -2244,7 +2244,7 @@ static switch_status_t load_skinny_config(void)
char *val = (char *) switch_xml_attr_soft(param, "value"); char *val = (char *) switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "firmware-version")) { if (!strcasecmp(var, "firmware-version")) {
switch_copy_string(params->firmware_version, val, 16); strncpy(params->firmware_version, val, 16);
} }
} /* param */ } /* param */
switch_core_hash_insert(profile->device_type_params_hash, id_str, params); switch_core_hash_insert(profile->device_type_params_hash, id_str, params);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论