user_events: Fix potential uninitialized pointer while parsing field
authorBeau Belgrave <beaub@linux.microsoft.com>
Thu, 24 Feb 2022 18:16:37 +0000 (10:16 -0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 10 Mar 2022 22:41:18 +0000 (17:41 -0500)
commit173c2049d12b441b498d6423276f5dd76b1e637b
treebdaf00f8e1dc79f5c3c68612eb44ffa48efef2e4
parent9f8e5aee93ed2482638d577a56806b455084b595
user_events: Fix potential uninitialized pointer while parsing field

Ensure name is initialized by default to NULL to prevent possible edge
cases that could lead to it being left uninitialized. Add an explicit
check for NULL name to ensure edge boundaries.

Link: https://lore.kernel.org/bpf/20220224105334.GA2248@kili/
Link: https://lore.kernel.org/linux-trace-devel/20220224181637.2129-1-beaub@linux.microsoft.com
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_user.c