sctp: fix copying more bytes than expected in sctp_add_bind_addr
[cascardo/linux.git] / net / sctp / protocol.c
index 1099e99..d3d50da 100644 (file)
@@ -216,6 +216,7 @@ int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp,
                              (copy_flags & SCTP_ADDR6_ALLOWED) &&
                              (copy_flags & SCTP_ADDR6_PEERSUPP)))) {
                                error = sctp_add_bind_addr(bp, &addr->a,
+                                                   sizeof(addr->a),
                                                    SCTP_ADDR_SRC, GFP_ATOMIC);
                                if (error)
                                        goto end_copy;