]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcb0d2815596b717a2802669bd2d9e01fd4e62a15
tree37a574b787a29790c256a908c03fafd55b22e6ed
parentf935a5205ae218926a52704a612fce2349768a5b
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