-
Notifications
You must be signed in to change notification settings - Fork 385
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
bufferoverflow on run #479
Comments
Yuck. I think this should fix it. Can you check? --- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -277,7 +277,7 @@ void ScreenPrinter::draw_scenario_screen()
display_scenario->stats->GetStat(CStat::CPT_C_OutgoingCallCreated);
if (creationMode == MODE_SERVER) {
lines.push_back(" Port Total-time Total-calls Transport");
- snprintf(buf, 256, " %-5d %6lu.%02lu s %8llu %s", local_port,
+ snprintf(buf, bufsiz, " %-5d %6lu.%02lu s %8llu %s", local_port,
clock_tick / 1000, (clock_tick % 1000) / 10, total_calls,
TRANSPORT_TO_STRING(transport));
lines.push_back(buf);
@@ -286,7 +286,7 @@ void ScreenPrinter::draw_scenario_screen()
if (users >= 0) {
lines.push_back(" Users (length) Port Total-time "
"Total-calls Remote-host");
- snprintf(buf, 256,
+ snprintf(buf, bufsiz,
" %d (%d ms) %-5d %6lu.%02lu s %8llu %s:%d(%s)",
users, duration, local_port, clock_tick / 1000,
(clock_tick % 1000) / 10, total_calls, remote_ip,
@@ -296,7 +296,7 @@ void ScreenPrinter::draw_scenario_screen()
lines.push_back(" Call rate (length) Port Total-time "
"Total-calls Remote-host");
snprintf(
- buf, 256,
+ buf, bufsiz,
" %3.1f(%d ms)/%5.3fs %-5d %6lu.%02lu s %8llu %s:%d(%s)",
rate, duration, (double)rate_period_ms / 1000.0, local_port,
clock_tick / 1000, (clock_tick % 1000) / 10, total_calls, |
tested on arm and x86 systems and it worked on both. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
after compiling -git on arch linux and attempting to run sipp -sn uas I get the below error.
I also see the same attempting uac and any remote address.
using gdb i see the below
The text was updated successfully, but these errors were encountered: