Skip to content
Commit 06236821 authored by Takashi Iwai's avatar Takashi Iwai Committed by Will Deacon
Browse files

perf: arm-ccn: Use scnprintf() for robustness



snprintf() is a hard-to-use function, it's especially difficult to use
it for concatenating substrings in a buffer with a limited size.
Since snprintf() returns the would-be-output size, not the actual
size, the subsequent use of snprintf() may point to the incorrect
position easily.  Although the current code doesn't actually overflow
the buffer, it's an incorrect usage.

This patch replaces such snprintf() calls with a safer version,
scnprintf().

Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 29cc4cee
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment