[SCSI] qla4xxx: Fix memory corruption issue in qla4xxx_get_ep_fwdb.
authorManish Rangankar <manish.rangankar@qlogic.com>
Fri, 23 Nov 2012 11:58:40 +0000 (06:58 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 29 Jan 2013 02:55:07 +0000 (13:55 +1100)
commit3dd4849c257af317cd33bcecf7d17b75dabf7540
treea2f895a43a194d27fc3d3365ee25614ed67a69e9
parentad5da8c404858bf573c394d66b73b43a8e0fe5fc
[SCSI] qla4xxx: Fix memory corruption issue in qla4xxx_get_ep_fwdb.

In qla4xxx_get_ep_fwdb(), dst_addr is of type struct sockaddr.
We are copying sizeof(struct sockaddr_in6) bytes to dst_addr
which is 12 bytes larger. This will cause memory corruption.
So we change dst_addr to struct sockaddr_storage which is
of 128 byte, large enough to hold sizeof(struct sockaddr_in6).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_os.c