Commit 8e366916 authored by Dmitry Frank's avatar Dmitry Frank Committed by Cesanta Bot

Ensure that the name buffer is null-terminated

CL: none

PUBLISHED_FROM=f165b556582f712c2c1c752e01c41d22fe593397
parent 33f53ab0
......@@ -11699,6 +11699,8 @@ int mg_resolve_async_opt(struct mg_mgr *mgr, const char *name, int query,
}
strncpy(req->name, name, sizeof(req->name));
req->name[sizeof(req->name) - 1] = '\0';
req->query = query;
req->callback = cb;
req->data = data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment