summaryrefslogtreecommitdiffstats
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ć
Stéphane Moutard-Martin
Rune Pade
Michael Rey
+Yuxuan Shui
The libmad team
The 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)
unsigned long i;
int type;
- if (read(fd, buf, 4) < 0)
+ if (read(fd, buf, 4) != 4)
{
return rc;
}
@@ -73,7 +73,7 @@ bool get_flac_metadata(int fd, struct mp3entry* id3)
{
unsigned long totalsamples;
- if (i >= sizeof(id3->path) || read(fd, buf, i) < 0)
+ if (i >= sizeof(id3->path) || read(fd, buf, i) != i)
{
return rc;
}