From f816911f0c6bd64a5a2ef05e95007db0db50765a Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Mon, 1 May 2017 17:40:20 -0700 Subject: [PATCH] metadata: Fix potential crash on 3GP scanning If we encounter a 3GP video file with no audio stream, we could end up accessing out-of-bounds memory. --- metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.c b/metadata.c index 72dc396..de4815a 100644 --- a/metadata.c +++ b/metadata.c @@ -1273,8 +1273,8 @@ GetVideoMetadata(const char *path, char *name) off += sprintf(m.dlna_pn+off, "3GPP_SP_L0B_AMR"); break; default: - DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for MPEG4-P2 3GP/0x%X file %s\n", - lav_codec_id(astream), basepath); + DPRINTF(E_DEBUG, L_METADATA, "No DLNA profile found for MPEG4-P2 3GP/%d file %s\n", + audio_profile, basepath); free(m.dlna_pn); m.dlna_pn = NULL; break;