mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-22 04:09:13 +00:00
fix bug introduced in c3d71b97abf943eb3c4937cb50db549e6ad74f05
see #459
This commit is contained in:
parent
fb63cf3455
commit
b8c8cec26b
@ -519,7 +519,7 @@ table_cb(const struct nlmsghdr *nlh, void *data)
|
|||||||
r->desc = malloc(r->desc_len + 1);
|
r->desc = malloc(r->desc_len + 1);
|
||||||
if (r->desc != NULL) {
|
if (r->desc != NULL) {
|
||||||
memcpy(r->desc, descr, r->desc_len);
|
memcpy(r->desc, descr, r->desc_len);
|
||||||
r->desc[r->desc_len + 1] = '\0';
|
r->desc[r->desc_len] = '\0';
|
||||||
} else {
|
} else {
|
||||||
syslog(LOG_ERR, "failed to allocate %u bytes for desc", r->desc_len);
|
syslog(LOG_ERR, "failed to allocate %u bytes for desc", r->desc_len);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user