mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 19:19:00 +08:00
Ensure that the name buffer is null-terminated
CL: none PUBLISHED_FROM=f165b556582f712c2c1c752e01c41d22fe593397
This commit is contained in:
parent
33f53ab000
commit
8e366916d5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user