Previously the terminating NUL wasn't copied which resulted
in a compiler warning. This didn't cause actual problems as
the target buffer was initialized by zalloc_or_die() so the
last byte of the target buffer was NUL already.
Actually copying the terminating NUL seems clearer, though.
Reported by: Lee
size_t parameter_len = strlen(parameter_string);
ciphersuites_string = zalloc_or_die(parameter_len + 1);
- strncpy(ciphersuites_string, parameter_string, parameter_len);
+ strlcpy(ciphersuites_string, parameter_string, parameter_len + 1);
ciphersuites_index = ciphersuites_string;
while (*ciphersuites_index)