Skip to content

Commit f59b3c8

Browse files
committedJun 11, 2024
sfeakes#135: Buffer overflow in action_web_request
1 parent 197bf93 commit f59b3c8

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
@@ -1589,8 +1589,8 @@ void action_web_request(struct mg_connection *nc, struct http_message *http_msg)
15891589
mg_send_head(nc, 200, strlen(GET_RTN_UNKNOWN), CONTENT_TEXT);
15901590
mg_send(nc, GET_RTN_UNKNOWN, strlen(GET_RTN_UNKNOWN));
15911591
}
1592-
1593-
sprintf(buf, "action_web_request() request '%.*s' took",(int)http_msg->uri.len, http_msg->uri.p);
1592+
snprintf(buf, sizeof(buf), "action_web_request() request '%.*s' took",
1593+
(int)http_msg->uri.len, http_msg->uri.p);
15941594

15951595
DEBUG_TIMER_STOP(tid, NET_LOG, buf);
15961596
}
@@ -2171,4 +2171,4 @@ bool start_net_services(/*struct mg_mgr *mgr, */struct aqualinkdata *aqdata)
21712171
return true;
21722172
}
21732173

2174-
#endif
2174+
#endif

0 commit comments

Comments
 (0)