Commit 0b6e2e22 authored by Leo Yan's avatar Leo Yan Committed by Masami Hiramatsu (Google)
Browse files

tracing: Consider the NULL character when validating the event length

strlen() returns a string length excluding the null byte. If the string
length equals to the maximum buffer length, the buffer will have no
space for the NULL terminating character.

This commit checks this condition and returns failure for it.

Link: https://lore.kernel.org/all/20241007144724.920954-1-leo.yan@arm.com/



Fixes: dec65d79 ("tracing/probe: Check event name length correctly")
Signed-off-by: default avatarLeo Yan <leo.yan@arm.com>
Reviewed-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
parent 73f35080
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment