Skip to content

Commit

Permalink
enh: Move iperf_printf's buffer off the stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmah888 authored and hanvari committed Jul 3, 2021
1 parent 6d6d3ec commit 7155dab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iperf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -4512,7 +4512,8 @@ iperf_clearaffinity(struct iperf_test *test)
#endif /* neither HAVE_SCHED_SETAFFINITY nor HAVE_CPUSET_SETAFFINITY nor HAVE_SETPROCESSAFFINITYMASK */
}

char iperf_timestr[100];
static char iperf_timestr[100];
static char linebuffer[1024];

int
iperf_printf(struct iperf_test *test, const char* format, ...)
Expand Down Expand Up @@ -4564,7 +4565,6 @@ iperf_printf(struct iperf_test *test, const char* format, ...)
r += r0;
}
else if (test->role == 's') {
char linebuffer[1024];
if (ct) {
r0 = snprintf(linebuffer, sizeof(linebuffer), "%s", ct);
if (r0 < 0)
Expand Down

0 comments on commit 7155dab

Please sign in to comment.