Commit fc4868a0 authored by J. Alexander Treuman's avatar J. Alexander Treuman

Check that the APE tag length is valid before allocating a buffer for it.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5098 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 08003904
......@@ -421,6 +421,8 @@ MpdTag *apeDup(char *file)
/* read tag into buffer */
tagLen -= sizeof(footer);
if (tagLen <= 0)
goto fail;
buffer = xmalloc(tagLen);
if (fread(buffer, 1, tagLen, fp) != tagLen)
goto fail;
......
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