chiark / gitweb /
sd-rtnl: message - protect against SEGFAULT when reading messages
authorTom Gundersen <teg@jklm.no>
Sun, 23 Mar 2014 20:44:47 +0000 (21:44 +0100)
committerTom Gundersen <teg@jklm.no>
Sun, 23 Mar 2014 20:54:16 +0000 (21:54 +0100)
commitf66eeb6bb636f8061bf45e6e8e24761e87510800
tree9a58b940eb3b14c77abdc5456e03a2efe711918b
parenta212d0dadd1e5e7bc0a57b8dfe2feb9111db2678
sd-rtnl: message - protect against SEGFAULT when reading messages

Make sure the returned data fits the datatype we requested. Otherwise return -EIO.

Also fix a broken test that this exposed.
src/libsystemd/sd-rtnl/rtnl-message.c
src/libsystemd/sd-rtnl/test-rtnl.c