Skip to content

Commit

Permalink
core: set null-terminated char for modparam (backport from master)
Browse files Browse the repository at this point in the history
  • Loading branch information
juha-h committed Mar 12, 2024
1 parent c229e11 commit 1928af8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/modparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ int set_mod_param_regex(char *regex, char *name, modparam_t type, void *val)
return -1;
}
strncpy(*((char **)ptr), (char *)val2, len_param);
(*((char **)ptr))[len_param] = '\0';
break;

case PARAM_STR:
Expand Down

0 comments on commit 1928af8

Please sign in to comment.