Skip to content

Commit efd2aa1

Browse files
committed
sfeakes#135: Buffer overflow in action_web_request
1 parent 4d7322a commit efd2aa1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net_services.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1493,8 +1493,8 @@ void action_web_request(struct mg_connection *nc, struct http_message *http_msg)
14931493
mg_send_head(nc, 200, strlen(GET_RTN_UNKNOWN), CONTENT_TEXT);
14941494
mg_send(nc, GET_RTN_UNKNOWN, strlen(GET_RTN_UNKNOWN));
14951495
}
1496-
1497-
sprintf(buf, "action_web_request() request '%.*s' took",(int)http_msg->uri.len, http_msg->uri.p);
1496+
snprintf(buf, sizeof(buf), "action_web_request() request '%.*s' took",
1497+
(int)http_msg->uri.len, http_msg->uri.p);
14981498

14991499
DEBUG_TIMER_STOP(tid, NET_LOG, buf);
15001500
}
@@ -2049,4 +2049,4 @@ bool start_net_services(/*struct mg_mgr *mgr, */struct aqualinkdata *aqdata)
20492049
return true;
20502050
}
20512051

2052-
#endif
2052+
#endif

0 commit comments

Comments
 (0)