From df80b70013d3bd36aba13c79e1de7182a6aa4496 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 16 Jun 2021 10:36:17 +0200 Subject: [PATCH] a52: fix possible string overflow and double space Signed-off-by: Jaroslav Kysela --- a52/pcm_a52.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c index a6b04a1..e48489e 100644 --- a/a52/pcm_a52.c +++ b/a52/pcm_a52.c @@ -973,7 +973,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(a52) unsigned int bitrate = 448; unsigned int channels = 6; snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE; - char devstr[128], tmpcard[8]; + char devstr[128], tmpcard[16]; struct a52_ctx *rec; if (stream != SND_PCM_STREAM_PLAYBACK) { @@ -1116,7 +1116,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(a52) if (! pcm_string || pcm_string[0] == '\0') { snprintf(devstr, sizeof(devstr), - "iec958:{AES0 0x%x AES1 0x%x AES2 0x%x AES3 0x%x %s%s}", + "iec958:{AES0 0x%x AES1 0x%x AES2 0x%x AES3 0x%x%s%s}", IEC958_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO | IEC958_AES0_CON_NOT_COPYRIGHT, IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER, -- 2.47.1