sd-bus: fix possible division by 0

Fixes #17541.
This commit is contained in:
Yu Watanabe 2020-11-09 14:33:16 +09:00
parent 755b35b1aa
commit 291bb0b01c

View file

@ -3189,6 +3189,8 @@ static int container_next_item(sd_bus_message *m, struct bus_container *c, size_
int sz;
sz = bus_gvariant_get_size(c->signature);
if (sz == 0)
return -EBADMSG;
if (sz < 0) {
int alignment;