aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tag.c b/src/tag.c
index 276aeebec..8137347a8 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -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;