1
0
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:
Daniel Mack 2015-09-17 00:05:58 +02:00
commit 83563d169c

View File

@ -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;