Skip to content

Commit

Permalink
Minimal fix for Wformat-overflow, because #548 is postponed
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelortmann committed Aug 1, 2024
1 parent 74c7861 commit 0a54aac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mod/uptime.mod/uptime.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef struct PackUp {
unsigned long ontime;
unsigned long now2;
unsigned long sysup;
char string[3];
char string[FLEXIBLE_ARRAY_MEMBER];
} PackUp;

PackUp upPack;
Expand Down Expand Up @@ -213,7 +213,7 @@ static int send_uptime(void)
upPack.sysup = htonl(st.st_ctime);

len = sizeof(upPack) + strlen(botnetnick) + strlen(servhost) +
strlen(uptime_version);
strlen(uptime_version) + 8;
mem = (PackUp *) nmalloc(len);
egg_bzero(mem, len); /* mem *should* be completely filled before it's
* sent to the server. But belt-and-suspenders
Expand Down

0 comments on commit 0a54aac

Please sign in to comment.