[PATCH] wifi: mt76: fix coverity uninit_use_in_call in mt76_connac2_reverse_frag0_hdr_trans()
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Wed Dec 7 05:17:23 PST 2022
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
More information about the Linux-mediatek
mailing list