Commit d9a00b1e authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by Jean-Baptiste Kempf

Fix a memory leak in ParseVorbisComments().

Also, don't abort parsing the rest of the comments if we encounter
an empty one.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d55b9179
......@@ -569,15 +569,12 @@ static void ParseVorbisComments( decoder_t *p_dec )
break;
psz_name = psz_comment;
psz_value = strchr( psz_comment, '=' );
if( psz_value )
/* Don't add empty values */
if( psz_value && psz_value[1] != '\0')
{
*psz_value = '\0';
psz_value++;
/* Don't add empty values */
if( *psz_value == '\0' )
break;
if( !strcasecmp( psz_name, "REPLAYGAIN_TRACK_GAIN" ) ||
!strcasecmp( psz_name, "RG_RADIO" ) )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment