diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2006-11-26 03:51:46 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2006-11-26 03:51:46 +0000 |
commit | fc4868a04006d6ed755c7d4928267973e3f42596 (patch) | |
tree | 09fc946e4c367fc38c9753be03d838ff6ab8add0 | |
parent | 08003904d7af58c0402b49805b9f87b3d9ebbc27 (diff) | |
download | mpd-fc4868a04006d6ed755c7d4928267973e3f42596.tar.gz mpd-fc4868a04006d6ed755c7d4928267973e3f42596.tar.xz mpd-fc4868a04006d6ed755c7d4928267973e3f42596.zip |
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
-rw-r--r-- | src/tag.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |