From 6f0ed8e0b2605475850d85608bfa4bbe1bb38a0b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 30 Oct 2018 21:04:39 -0400 Subject: audio: increase a buffer size The buffer is written to in `audio_config_to_str_buf` using `snprintf` with a `%s` formatting of a 128-byte buffer. This can overflow the target buffer of 80 causing a truncated output. --- player/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/audio.c b/player/audio.c index 28e7867ca1..62bc5405f1 100644 --- a/player/audio.c +++ b/player/audio.c @@ -403,7 +403,7 @@ static void reinit_audio_filters_and_output(struct MPContext *mpctx) mp_audio_buffer_reinit_fmt(ao_c->ao_buffer, ao_format, &ao_channels, ao_rate); - char tmp[80]; + char tmp[192]; MP_INFO(mpctx, "AO: [%s] %s\n", ao_get_name(mpctx->ao), audio_config_to_str_buf(tmp, sizeof(tmp), ao_rate, ao_format, ao_channels)); -- cgit v1.2.3