lkml.org 
[lkml]   [2022]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] mwifiex: Fix potential dereference of NULL pointer
    Date
    Yongzhi Liu <lyz_cs@pku.edu.cn> writes:

    > If 'card' is not valid, then we need to check the
    > field 'adapter' and 'priv_num' to avoid use of NULL
    > pointer in function 'mwifiex_get_priv'. Fix this by
    > adding the null pointer check on them.

    Why? We don't add null checks for every access, why does this function
    need it?

    How did you find this? Is this something you found with a static checker
    tool or by testing with a real device?

    > Fixes: 21c5c83ce ("mwifiex: support sysfs initiated device coredump")

    Format is wrong, it should be:

    Fixes: 21c5c83ce833 ("mwifiex: support sysfs initiated device coredump")

    --
    https://patchwork.kernel.org/project/linux-wireless/list/

    https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

    \
     
     \ /
      Last update: 2022-05-19 17:39    [W:4.415 / U:1.528 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site