OSDN Git Service

crypto: bcm - Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 07:15:06 +0000 (08:15 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Mar 2020 03:36:51 +0000 (14:36 +1100)
commit7fe8e483ec6f62ad43e9c2ba7e07b047f4d35d69
tree37a574b787a29790c256a908c03fafd55b22e6ed
parent2638268fa9ebe4f13a8aee89044719f2084f80c8
crypto: bcm - 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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/bcm/util.c