mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
Merge pull request #1285 from michich/fix-dbus-fd-recv
sd-bus: correct size calculation in DBus fd receive
This commit is contained in:
commit
83563d169c
@ -985,7 +985,7 @@ int bus_socket_read_message(sd_bus *bus) {
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
f = realloc(bus->fds, sizeof(int) + (bus->n_fds + n));
|
||||
f = realloc(bus->fds, sizeof(int) * (bus->n_fds + n));
|
||||
if (!f) {
|
||||
close_many((int*) CMSG_DATA(cmsg), n);
|
||||
return -ENOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user