lkml.org 
[lkml]   [2023]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 -next] of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()

On Thu, 27 Jul 2023 16:02:46 +0800, Ruan Jinjie wrote:
> when kmalloc() fail to allocate memory in kasprintf(), name
> or full_name will be NULL, strcmp() will cause
> null pointer dereference.
>
> Fixes: 0d638a07d3a1 ("of: Convert to using %pOF instead of full_name")
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
> v2:
> - add fixes tag
> ---
> drivers/of/unittest.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>

Applied, thanks!

\
 
 \ /
  Last update: 2023-07-27 19:06    [W:0.022 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site