diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-03-15 10:37:15 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-03-17 22:45:56 +0000 |
commit | 06236821aeac480a0835dd8dd9fb20e3b5a5d80d (patch) | |
tree | c02c1fef0dfb0b65164cb5f987ba1b50cea6eb65 /scripts/dtc | |
parent | 29cc4ceeac1274ab8363a11b81ebd99f3b023985 (diff) |
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: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'scripts/dtc')
0 files changed, 0 insertions, 0 deletions