if (BGP_DEBUG(flowspec, FLOWSPEC)) {
char return_string[BGP_FLOWSPEC_NLRI_STRING_MAX];
- char local_string[BGP_FLOWSPEC_NLRI_STRING_MAX * 2];
+ char local_string[BGP_FLOWSPEC_NLRI_STRING_MAX*2+16];
char ec_string[BGP_FLOWSPEC_NLRI_STRING_MAX];
char *s = NULL;
char addr_str[INET_ADDRSTRLEN];
struct pim_assert_metric *am;
struct in_addr ifaddr;
- char pref_str[5];
- char metr_str[7];
+ char pref_str[16];
+ char metr_str[16];
ifaddr = pim_ifp->primary_address;
char *pim_channel_oil_dump(struct channel_oil *c_oil, char *buf, size_t size)
{
+ char *out;
struct prefix_sg sg;
int i;
sg.src = c_oil->oil.mfcc_origin;
sg.grp = c_oil->oil.mfcc_mcastgrp;
- sprintf(buf, "%s IIF: %d, OIFS: ", pim_str_sg_dump(&sg),
- c_oil->oil.mfcc_parent);
+ snprintf(buf, size, "%s IIF: %d, OIFS: ", pim_str_sg_dump(&sg),
+ c_oil->oil.mfcc_parent);
+ out = buf + strlen(buf);
for (i = 0; i < MAXVIFS; i++) {
if (c_oil->oil.mfcc_ttls[i] != 0) {
- char buf1[10];
- sprintf(buf1, "%d ", i);
- strcat(buf, buf1);
+ snprintf(out, buf + size - out, "%d ", i);
+ out += strlen(out);
}
}