mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 17:58:11 +08:00
Ensure not to overflow buf in udp server example
PUBLISHED_FROM=413f5073b0fc267d66ce04d8d40e9e9d7abac94d
This commit is contained in:
parent
e116c48bef
commit
e5b3b8ad32
@ -79,7 +79,7 @@ int main(int argc, char **argv) {
|
||||
mg_mgr_init(&mgr, NULL);
|
||||
{
|
||||
char listen[256];
|
||||
sprintf(listen, "udp://%s", port);
|
||||
snprintf(listen, sizeof(listen), "udp://%s", port);
|
||||
nc = mg_bind(&mgr, listen, ev_handler);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user