Skip to content

Commit

Permalink
Fix buffer overflow in hinic_devlink.c:hinic_flash_fw
Browse files Browse the repository at this point in the history
Signed-off-by: zhenghao hu <huzh@nyu.edu>
  • Loading branch information
HighW4y2H3ll authored and intel-lab-lkp committed Jun 17, 2022
1 parent 7fb0269 commit 821efd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/huawei/hinic/hinic_port.h
Expand Up @@ -13,6 +13,7 @@
#include <linux/bitops.h>

#include "hinic_dev.h"
#include "hinic_devlink.h"

#define HINIC_RSS_KEY_SIZE 40
#define HINIC_RSS_INDIR_SIZE 256
Expand Down Expand Up @@ -751,7 +752,7 @@ struct hinic_cmd_update_fw {
u32 setion_total_len;
u32 fw_section_version;
u32 section_offset;
u32 data[384];
u32 data[MAX_FW_FRAGMENT_LEN];
};

int hinic_port_add_mac(struct hinic_dev *nic_dev, const u8 *addr,
Expand Down

0 comments on commit 821efd0

Please sign in to comment.