&& p->capability(cfg)
&& (mode & p->mode) == mode) {
if (*buffer) {
- strcat(buffer, str_flags_separator);
- strcat(buffer, p->flag_text);
- } else {
- strcpy(buffer, p->flag_text);
+ strncat(buffer, str_flags_separator, 256 - strlen(buffer));
}
+ strncat(buffer, p->flag_text, 256 - strlen(buffer));
}
}
pos += snprintf(buf + pos, len - (size_t)pos, "%s%s%s\n", str_ticket_flags, str_key_value_separator, buffer);
&& p->capability(cfg)
&& (mode & p->mode) == mode) {
if (*buffer) {
- strcat(buffer, str_flags_separator);
- strcat(buffer, p->flag_text);
- } else {
- strcpy(buffer, p->flag_text);
+ strncat(buffer, str_flags_separator, 256 - strlen(buffer));
}
+ strncat(buffer, p->flag_text, 256 - strlen(buffer));
/* make sure we don't show more than one cfgFlag per value -
some cfgflags share value in different contexts
*/
&& p->capability(cfg)
&& (mode & p->mode) == mode) {
if (*buffer) {
- strcat(buffer, str_flags_separator);
- strcat(buffer, p->flag_text);
- } else {
- strcpy(buffer, p->flag_text);
+ strncat(buffer, str_flags_separator, 256 - strlen(buffer));
}
+ strncat(buffer, p->flag_text, 256 - strlen(buffer));
}
}
pos += snprintf(buf + pos, len - (size_t)pos, "%s%s%s\n", str_extended_flags, str_key_value_separator, buffer);