summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/CREDITS1
-rw-r--r--lib/rbcodec/metadata/flac.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/CREDITS b/docs/CREDITS
index a1041f4952..db74a3bacd 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -697,6 +697,7 @@ Boris Kovačević
697Stéphane Moutard-Martin 697Stéphane Moutard-Martin
698Rune Pade 698Rune Pade
699Michael Rey 699Michael Rey
700Yuxuan Shui
700 701
701The libmad team 702The libmad team
702The wavpack team 703The wavpack team
diff --git a/lib/rbcodec/metadata/flac.c b/lib/rbcodec/metadata/flac.c
index df25bb9b4d..af39c1346b 100644
--- a/lib/rbcodec/metadata/flac.c
+++ b/lib/rbcodec/metadata/flac.c
@@ -59,7 +59,7 @@ bool get_flac_metadata(int fd, struct mp3entry* id3)
59 unsigned long i; 59 unsigned long i;
60 int type; 60 int type;
61 61
62 if (read(fd, buf, 4) < 0) 62 if (read(fd, buf, 4) != 4)
63 { 63 {
64 return rc; 64 return rc;
65 } 65 }
@@ -73,7 +73,7 @@ bool get_flac_metadata(int fd, struct mp3entry* id3)
73 { 73 {
74 unsigned long totalsamples; 74 unsigned long totalsamples;
75 75
76 if (i >= sizeof(id3->path) || read(fd, buf, i) < 0) 76 if (i >= sizeof(id3->path) || read(fd, buf, i) != i)
77 { 77 {
78 return rc; 78 return rc;
79 } 79 }