]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/rd: fix crash with long process cmdlines
authorRob Clark <robdclark@gmail.com>
Tue, 25 Sep 2018 17:54:00 +0000 (13:54 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 4 Oct 2018 00:24:54 +0000 (20:24 -0400)
commit9687afc16305b0cbb552067966e6fb34252427f7
treeae96c941ea7706a5f4daa4c4f9a2eeaa03b3816b
parent4bd3e1ebbc300d251230159e1d43eb8cd5988a13
drm/msm/rd: fix crash with long process cmdlines

The [v]snprintf() functions return the size that *would have* been
written into the buffer, rather than the size *actually* written.
Which results in us trying to memcpy() past the end of the stack.

What we really want is [v]scnprintf().

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_rd.c