]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-ndisc: rework size checking in ndisc_ra_parse()
authorLennart Poettering <lennart@poettering.net>
Tue, 24 May 2016 19:28:11 +0000 (21:28 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 26 May 2016 13:34:43 +0000 (15:34 +0200)
commit901c983b6dca860e675fd77f703a44f15d900101
tree2b13559d1c2526d8799c06c62550eb9a22a632a0
parent745c5152c210738e20bae5e377262e270f7a0335
sd-ndisc: rework size checking in ndisc_ra_parse()

Let's better check the size before we subtract. Also, let's change the size
argument to size_t, as it cannot be signed anyway.

Finally, use EBADMSG for indicating invalid packets, like we do everywhere
else.
src/libsystemd-network/sd-ndisc.c