diff options
-rw-r--r-- | docs/CREDITS | 1 | ||||
-rw-r--r-- | lib/rbcodec/metadata/flac.c | 4 |
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ć | |||
697 | Stéphane Moutard-Martin | 697 | Stéphane Moutard-Martin |
698 | Rune Pade | 698 | Rune Pade |
699 | Michael Rey | 699 | Michael Rey |
700 | Yuxuan Shui | ||
700 | 701 | ||
701 | The libmad team | 702 | The libmad team |
702 | The wavpack team | 703 | 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) | |||
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 | } |