Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal fix for Wformat-overflow, because #548 is postponed #1667

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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