]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 07:34:10 +0000 (08:34 +0100)
committerRob Clark <robdclark@chromium.org>
Thu, 19 Mar 2020 19:09:04 +0000 (12:09 -0700)
commitd1d172a018c6fa302d8d42e2b6e5f54a2734499c
tree36546a4b1ac18de5bbb038b1cb2a01fea87a494b
parent19209245a88757aacebecbac70c10ea736526f32
drm/msm: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/adreno_gpu.c