Skip to content

Commit

Permalink
sfeakes#135: Buffer overflow in action_web_request
Browse files Browse the repository at this point in the history
  • Loading branch information
ballle98 committed Jun 15, 2023
1 parent c1a4eef commit 8fba38b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net_services.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,8 +1399,8 @@ void action_web_request(struct mg_connection *nc, struct http_message *http_msg)
mg_send_head(nc, 200, strlen(GET_RTN_UNKNOWN), CONTENT_TEXT);
mg_send(nc, GET_RTN_UNKNOWN, strlen(GET_RTN_UNKNOWN));
}

sprintf(buf, "action_web_request() request '%.*s' took",(int)http_msg->uri.len, http_msg->uri.p);
snprintf(buf, sizeof(buf), "action_web_request() request '%.*s' took",
(int)http_msg->uri.len, http_msg->uri.p);

DEBUG_TIMER_STOP(tid, NET_LOG, buf);
}
Expand Down Expand Up @@ -2407,4 +2407,4 @@ void OLD_action_websocket_request(struct mg_connection *nc, struct websocket_mes
}
}

#endif // INCLUDE_V1_API
#endif // INCLUDE_V1_API

0 comments on commit 8fba38b

Please sign in to comment.