[PATCH] wifi: mt76: fix coverity uninit_use_in_call in mt76_connac2_reverse_frag0_hdr_trans()
Deren Wu (武德仁)
Deren.Wu at mediatek.com
Wed Dec 7 07:31:32 PST 2022
On Wed, 2022-12-07 at 14:17 +0100, AngeloGioacchino Del Regno wrote:
> Il 07/12/22 10:22, Deren Wu ha scritto:
> > The default case for frame_contorl is invalid. We should always
> > assign addr3 of this frame properly.
> >
> > Coverity error message:
> > if (ieee80211_has_a4(hdr.frame_control))
> > (19) Event uninit_use_in_call: Using uninitialized value
> > "hdr".
> > Field "hdr.addr3" is uninitialized when calling "memcpy".
> > memcpy(skb_push(skb, sizeof(hdr)), &hdr, sizeof(hdr));
> > else
> > memcpy(skb_push(skb, sizeof(hdr) - 6), &hdr, sizeof(hdr) - 6);
> >
> > Signed-off-by: Deren Wu <deren.wu at mediatek.com>
>
> Please add the appropriate Fixes tag to this commit.
>
> Thanks,
> Angelo
>
Thanks, Angelo. I will post a new version with Fixes tag.
More information about the Linux-mediatek
mailing list