diff options
author | Shahed Shaikh <shahed.shaikh@qlogic.com> | 2015-07-29 13:55:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-30 08:57:26 +0200 |
commit | 15f1bb1f1e067be7088ed43ef23d59629bd24348 (patch) | |
tree | 59cdd79fe2da1624c2cdf6036b514cf935b3521e /drivers/net | |
parent | act_bpf: fix memory leaks when replacing bpf programs (diff) | |
download | linux-15f1bb1f1e067be7088ed43ef23d59629bd24348.tar.xz linux-15f1bb1f1e067be7088ed43ef23d59629bd24348.zip |
qlcnic: Fix corruption while copying
Use proper typecasting while performing byte-by-byte copy
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c index 33669c29b341..753ea8bad953 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c @@ -1415,7 +1415,7 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter) if (fw->size & 0xF) { addr = dest + size; for (i = 0; i < (fw->size & 0xF); i++) - data[i] = temp[size + i]; + data[i] = ((u8 *)temp)[size + i]; for (; i < 16; i++) data[i] = 0; ret = qlcnic_ms_mem_write128(adapter, addr, |