Skip to content

Commit

Permalink
Merge pull request #168 from cranderson/formatstrings
Browse files Browse the repository at this point in the history
increase some buffer sizes to eliminate format warnings
  • Loading branch information
schweikert authored Feb 23, 2020
2 parents 659d3d8 + a75a6f8 commit c1967a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fping.c
Original file line number Diff line number Diff line change
Expand Up @@ -2339,7 +2339,7 @@ void add_name(char* name)
}

if (name_flag || rdns_flag) {
char nameaddrbuf[512];
char nameaddrbuf[512+3];
snprintf(nameaddrbuf, sizeof(nameaddrbuf) / sizeof(char), "%s (%s)", printname, addrbuf);
add_addr(name, nameaddrbuf, res->ai_addr, res->ai_addrlen);
}
Expand Down Expand Up @@ -2583,7 +2583,7 @@ void timeval_add(struct timeval* a, long t_10u)

char* sprint_tm(int t)
{
static char buf[10];
static char buf[12];

if (t < 0) {
/* negative (unexpected) */
Expand Down

0 comments on commit c1967a2

Please sign in to comment.