]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: fix overrun in sctp_diag_dump_one()
authorLance Richardson <lrichard@redhat.com>
Tue, 23 Aug 2016 15:40:52 +0000 (11:40 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2016 00:22:53 +0000 (17:22 -0700)
commit40b9f110c3faa3f6a0ce26cf3918c8c2f35fa279
treec38b98c67c82791ae2612d4883bb5d8b72f632dc
parentbf5757f7f17dba5d38c8f0316036b9d494d50a81
sctp: fix overrun in sctp_diag_dump_one()

The function sctp_diag_dump_one() currently performs a memcpy()
of 64 bytes from a 16 byte field into another 16 byte field. Fix
by using correct size, use sizeof to obtain correct size instead
of using a hard-coded constant.

Fixes: 6360b73a23ca ("sctp: add the sctp_diag.c file")
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sctp_diag.c