while(names->name) {
if((names->value & value) == names->value) {
if (!first)
- util_strncat(output, "|", sizeof(output));
+ util_strncat(output, "|", sizeof(output) - strlen(output) - 1);
else
first = 0;
- util_strncat(output, names->name, sizeof(output) - 1);
+ util_strncat(output, names->name, sizeof(output) - strlen(output) - 1);
output[sizeof(output) - 1] = '\0';
value &= ~names->value;
}
if (value) {
if (!first)
- util_strncat(output, "|", sizeof(output));
+ util_strncat(output, "|", sizeof(output) - strlen(output) - 1);
else
first = 0;
util_snprintf(rest, sizeof(rest), "0x%08lx", value);
- util_strncat(output, rest, sizeof(output) - 1);
+ util_strncat(output, rest, sizeof(output) - strlen(output) - 1);
output[sizeof(output) - 1] = '\0';
}