staging: vhciq_core: replace snprintf with scnprintf
authorRohit Sarkar <rohitsarkar5398@gmail.com>
Wed, 11 Sep 2019 13:51:13 +0000 (19:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2019 09:38:45 +0000 (10:38 +0100)
commit63350bdb384543e2fcfd007b9da8239f03c56860
treeb63dba4c4ca94eae32e517195aebed65cd99f9a3
parent9a4c56be67f8153d8f8459c4c7bbbbc360d5fe9e
staging: vhciq_core: replace snprintf with scnprintf

When the number of bytes to be printed exceeds the limit snprintf
returns the number of bytes that would have been printed (if there was
no truncation). This might cause issues, hence use scnprintf which
returns the actual number of bytes printed to buffer always

Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20190911135112.GA5569@SARKAR
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c