aboutsummaryrefslogtreecommitdiff
path: root/lib/cpu-notifier-error-inject.c
diff options
context:
space:
mode:
authorMathias Krause <[email protected]>2013-09-30 22:04:25 +0200
committerEric Paris <[email protected]>2013-11-05 11:08:37 -0500
commit4d8fe7376a12bf4524783dd95cbc00f1fece6232 (patch)
treedb0c3dae0fa8592ed93e225a852c327d977cd4b9 /lib/cpu-notifier-error-inject.c
parente13f91e3c57986a609c10ddf94af0546a2a97dce (diff)
audit: use nlmsg_len() to get message payload length
Using the nlmsg_len member of the netlink header to test if the message is valid is wrong as it includes the size of the netlink header itself. Thereby allowing to send short netlink messages that pass those checks. Use nlmsg_len() instead to test for the right message length. The result of nlmsg_len() is guaranteed to be non-negative as the netlink message already passed the checks of nlmsg_ok(). Also switch to min_t() to please checkpatch.pl. Cc: Al Viro <[email protected]> Cc: Eric Paris <[email protected]> Cc: [email protected] # v2.6.6+ for the 1st hunk, v2.6.23+ for the 2nd Signed-off-by: Mathias Krause <[email protected]> Signed-off-by: Richard Guy Briggs <[email protected]> Signed-off-by: Eric Paris <[email protected]>
Diffstat (limited to 'lib/cpu-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions