To prevent possiblity of exceeding buffer size
Signed-off-by: Vinod Koul vinod.koul@intel.com --- sound/core/compress_offload.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index e640f8c..1e722c2 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -871,7 +871,7 @@ static int snd_compress_dev_register(struct snd_device *device) return -EBADFD; compr = device->device_data;
- sprintf(str, "comprC%iD%i", compr->card->number, compr->device); + snprintf(str, sizeof(str), "comprC%iD%i", compr->card->number, compr->device); pr_debug("reg %s for device %s, direction %d\n", str, compr->name, compr->direction); /* register compressed device */