]> git.baikalelectronics.ru Git - kernel.git/commit
net-timestamp: fix allocation error in test
authorWillem de Bruijn <willemb@google.com>
Thu, 4 Sep 2014 14:15:45 +0000 (10:15 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Sep 2014 00:31:03 +0000 (17:31 -0700)
commit02b9cc04bce1bbf320ac2a1c28b4ac5ab2c99e79
tree2fccea7845dc27a4d5543aa58c21fabf5ef0f033
parent7492eb8a25e34ad5b22204fa9000ae0b14568bf9
net-timestamp: fix allocation error in test

A buffer is incorrectly zeroed to the length of the pointer. If
cfg_payload_len < sizeof(void *) this can overwrites unrelated memory.
The buffer contents are never read, so no need to zero.

Fixes: a54a89459984 ("net-timestamp: expand documentation")
Reported-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/timestamping/txtimestamp.c